Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2014-11-03 04:16:49 +0300
committerJohn Fultz <jfultz@wolfram.com>2014-11-03 04:16:49 +0300
commitebc13b2b7cfa9c5c7d3f7762666337bb4fd10d10 (patch)
tree529b49b3ad71e1376b0bb2d298bc6c63d23a2c56 /tests/config/include.c
parent727ae380a5de63e7b5856abb1f4dd191e2d5b678 (diff)
Clean up issues include.path issues found during code review.
* Error-handling is cleaned up to only let a file-not-found error through, not other sorts of errors. And when a file-not-found error happens, we clean up the error. * Test now checks that file-not-found introduces no error. And other minor cleanups.
Diffstat (limited to 'tests/config/include.c')
-rw-r--r--tests/config/include.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/config/include.c b/tests/config/include.c
index b98252d1c..d4af59509 100644
--- a/tests/config/include.c
+++ b/tests/config/include.c
@@ -92,12 +92,13 @@ void test_config_include__missing(void)
git_config *cfg;
const char *str;
- cl_git_mkfile("included", "[include]\npath = nonexistentfile\n[foo]\nbar = baz");
+ cl_git_mkfile("including", "[include]\npath = nonexistentfile\n[foo]\nbar = baz");
- cl_git_pass(git_config_open_ondisk(&cfg, "included"));
+ giterr_clear();
+ cl_git_pass(git_config_open_ondisk(&cfg, "including"));
+ cl_assert(giterr_last() == NULL);
cl_git_pass(git_config_get_string(&str, cfg, "foo.bar"));
cl_assert_equal_s(str, "baz");
git_config_free(cfg);
- unlink("included");
}