summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe rugged tests are fragile <tanoku@gmail.com>2014-09-17 15:08:16 +0200
committerThe rugged tests are fragile <tanoku@gmail.com>2014-09-17 15:08:16 +0200
commit4cb7c4a4c7945c328c2e26e116dd46c49d1654ef (patch)
tree5e4814e890edf3bd0b7e94fa3217e80ae5666748
parentbbb988a5190be2a8763c60cb37c52466a39f6441 (diff)
downloadlibgit2-4cb7c4a4c7945c328c2e26e116dd46c49d1654ef.tar.gz
attr: Add an extra test for files under a subfolder
-rw-r--r--tests/attr/repo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/attr/repo.c b/tests/attr/repo.c
index e8b74c08c..8baf50622 100644
--- a/tests/attr/repo.c
+++ b/tests/attr/repo.c
@@ -368,4 +368,11 @@ void test_attr_repo__bare_repo_with_index(void)
cl_assert_equal_s("barfoo", values[1]);
cl_assert(GIT_ATTR_UNSPECIFIED(values[2]));
cl_assert(GIT_ATTR_TRUE(values[3]));
+
+ cl_git_pass(git_attr_get_many(values, g_repo, 0, "sub/sub/subdir.txt", 4, names));
+
+ cl_assert(GIT_ATTR_TRUE(values[0]));
+ cl_assert_equal_s("foobar", values[1]);
+ cl_assert(GIT_ATTR_FALSE(values[2]));
+ cl_assert(GIT_ATTR_UNSPECIFIED(values[3]));
}