We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1409f4 commit 9df6922Copy full SHA for 9df6922
tests/config/read.c
@@ -849,6 +849,23 @@ void test_config_read__invalid_quoted_third_section(void)
849
git_config_free(cfg);
850
}
851
852
+void test_config_read__unreadable_file_ignored(void)
853
+{
854
+ git_buf buf = GIT_BUF_INIT;
855
+ git_config *cfg;
856
+ int ret;
857
+
858
+ cl_set_cleanup(&clean_test_config, NULL);
859
+ cl_git_mkfile("./testconfig", "[some] var = value\n[some \"OtheR\"] var = value");
860
+ cl_git_pass(p_chmod("./testconfig", 0));
861
862
+ ret = git_config_open_ondisk(&cfg, "./test/config");
863
+ cl_assert(ret == 0 || ret == GIT_ENOTFOUND);
864
865
+ git_config_free(cfg);
866
+ git_buf_dispose(&buf);
867
+}
868
869
void test_config_read__single_line(void)
870
{
871
git_buf buf = GIT_BUF_INIT;
0 commit comments