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
f1409500
Commit
f1409500
authored
Aug 14, 2018
by
Nelson Elhage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write a test.
parent
ec76a1aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
tests/config/read.c
+15
-0
tests/resources/config/config-nosection
+1
-0
No files found.
tests/config/read.c
View file @
f1409500
...
...
@@ -758,3 +758,18 @@ void test_config_read__bom(void)
git_config_free
(
cfg
);
git_buf_dispose
(
&
buf
);
}
/* This would ideally issue a warning, if we had a way to do so. */
void
test_config_read__nosection
(
void
)
{
git_config
*
cfg
;
git_buf
buf
=
GIT_BUF_INIT
;
cl_git_pass
(
git_config_open_ondisk
(
&
cfg
,
cl_fixture
(
"config/config-nosection"
)));
cl_git_pass
(
git_config_get_string_buf
(
&
buf
,
cfg
,
"key"
));
cl_assert_equal_s
(
buf
.
ptr
,
"value"
);
git_buf_dispose
(
&
buf
);
git_config_free
(
cfg
);
}
tests/resources/config/config-nosection
0 → 100644
View file @
f1409500
key = value
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