Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
9df69223
Commit
9df69223
authored
May 23, 2020
by
Edward Thomson
Committed by
Patrick Steinhardt
Jun 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: test that unreadable files are treated as notfound
parent
d1409f48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
tests/config/read.c
+17
-0
No files found.
tests/config/read.c
View file @
9df69223
...
...
@@ -849,6 +849,23 @@ void test_config_read__invalid_quoted_third_section(void)
git_config_free
(
cfg
);
}
void
test_config_read__unreadable_file_ignored
(
void
)
{
git_buf
buf
=
GIT_BUF_INIT
;
git_config
*
cfg
;
int
ret
;
cl_set_cleanup
(
&
clean_test_config
,
NULL
);
cl_git_mkfile
(
"./testconfig"
,
"[some] var = value
\n
[some
\"
OtheR
\"
] var = value"
);
cl_git_pass
(
p_chmod
(
"./testconfig"
,
0
));
ret
=
git_config_open_ondisk
(
&
cfg
,
"./test/config"
);
cl_assert
(
ret
==
0
||
ret
==
GIT_ENOTFOUND
);
git_config_free
(
cfg
);
git_buf_dispose
(
&
buf
);
}
void
test_config_read__single_line
(
void
)
{
git_buf
buf
=
GIT_BUF_INIT
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment