Commit 4cb7c4a4c7945c328c2e26e116dd46c49d1654ef

The rugged tests are fragile 2014-09-17T15:08:16

attr: Add an extra test for files under a subfolder

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/tests/attr/repo.c b/tests/attr/repo.c
index e8b74c0..8baf506 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]));
 }