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:
authorCarlos Martín Nieto <cmn@dwim.me>2015-11-12 21:22:31 +0300
committerCarlos Martín Nieto <cmn@dwim.me>2015-11-12 21:22:31 +0300
commit2c26c8679ffc02b6644e20eba9458121b944beb6 (patch)
tree97a86f3892ea849386803df83065208df573d3ce /tests/core
parentecdc04287a9a245b9947aee21a86dc2f09a1bdcf (diff)
parent0a700ee368818da526981b09c1c5bbef8c9b5fb8 (diff)
Merge pull request #3499 from ethomson/ref_dir_errmsgs
Improve error messages when dirs prevent ref/reflog creation
Diffstat (limited to 'tests/core')
-rw-r--r--tests/core/filebuf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/core/filebuf.c b/tests/core/filebuf.c
index 915e3cc34..93aaed759 100644
--- a/tests/core/filebuf.c
+++ b/tests/core/filebuf.c
@@ -230,3 +230,12 @@ void test_core_filebuf__hidden_file(void)
git_filebuf_cleanup(&file);
#endif
}
+
+void test_core_filebuf__detects_directory(void)
+{
+ git_filebuf file = GIT_FILEBUF_INIT, fail = GIT_FILEBUF_INIT;
+
+ cl_must_pass(p_mkdir("foo", 0777));
+ cl_git_fail_with(GIT_EDIRECTORY, git_filebuf_open(&file, "foo", 0, 0666));
+ cl_must_pass(p_rmdir("foo"));
+}