Commit f1409500 by Nelson Elhage

Write a test.

parent ec76a1aa
......@@ -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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment