We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec76a1a commit f140950Copy full SHA for f140950
tests/config/read.c
@@ -758,3 +758,18 @@ void test_config_read__bom(void)
758
git_config_free(cfg);
759
git_buf_dispose(&buf);
760
}
761
+
762
+/* This would ideally issue a warning, if we had a way to do so. */
763
+void test_config_read__nosection(void)
764
+{
765
+ git_config *cfg;
766
+ git_buf buf = GIT_BUF_INIT;
767
768
+ cl_git_pass(git_config_open_ondisk(&cfg, cl_fixture("config/config-nosection")));
769
770
+ cl_git_pass(git_config_get_string_buf(&buf, cfg, "key"));
771
+ cl_assert_equal_s(buf.ptr, "value");
772
773
+ git_buf_dispose(&buf);
774
+ git_config_free(cfg);
775
+}
tests/resources/config/config-nosection
@@ -0,0 +1 @@
1
+key = value
0 commit comments