]> git.proxmox.com Git - libgit2.git/commitdiff
attr: Add an extra test for files under a subfolder
authorThe rugged tests are fragile <tanoku@gmail.com>
Wed, 17 Sep 2014 13:08:16 +0000 (15:08 +0200)
committerThe rugged tests are fragile <tanoku@gmail.com>
Wed, 17 Sep 2014 13:08:16 +0000 (15:08 +0200)
tests/attr/repo.c

index e8b74c08cf014b925967115646b7da59f8af7722..8baf50622770c7c1eff0efd6cbb55a9d2fc5e4f0 100644 (file)
@@ -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]));
 }