mirror of
https://git.proxmox.com/git/libgit2
synced 2025-07-05 11:30:07 +00:00
Add test for possible attr bug
This is a test that should replicate an issue that Peff is setting with git attributes. But the test doesn't fail.
This commit is contained in:
parent
e3d55b2add
commit
7e3fc62310
@ -29,8 +29,6 @@ void test_attr_repo__cleanup(void)
|
|||||||
|
|
||||||
void test_attr_repo__get_one(void)
|
void test_attr_repo__get_one(void)
|
||||||
{
|
{
|
||||||
const char *value;
|
|
||||||
|
|
||||||
struct attr_expected test_cases[] = {
|
struct attr_expected test_cases[] = {
|
||||||
{ "root_test1", "repoattr", EXPECT_TRUE, NULL },
|
{ "root_test1", "repoattr", EXPECT_TRUE, NULL },
|
||||||
{ "root_test1", "rootattr", EXPECT_TRUE, NULL },
|
{ "root_test1", "rootattr", EXPECT_TRUE, NULL },
|
||||||
@ -63,6 +61,8 @@ void test_attr_repo__get_one(void)
|
|||||||
{ "sub/sub/subdir.txt", "reposub", EXPECT_UNDEFINED, NULL },
|
{ "sub/sub/subdir.txt", "reposub", EXPECT_UNDEFINED, NULL },
|
||||||
{ "does-not-exist", "foo", EXPECT_STRING, "yes" },
|
{ "does-not-exist", "foo", EXPECT_STRING, "yes" },
|
||||||
{ "sub/deep/file", "deepdeep", EXPECT_TRUE, NULL },
|
{ "sub/deep/file", "deepdeep", EXPECT_TRUE, NULL },
|
||||||
|
{ "sub/sub/d/no", "test", EXPECT_STRING, "a/b/d/*" },
|
||||||
|
{ "sub/sub/d/yes", "test", EXPECT_UNDEFINED, NULL },
|
||||||
{ NULL, NULL, 0, NULL }
|
{ NULL, NULL, 0, NULL }
|
||||||
}, *scan;
|
}, *scan;
|
||||||
|
|
||||||
@ -224,3 +224,4 @@ void test_attr_repo__bad_macros(void)
|
|||||||
cl_assert_strequal("hahaha", values[4]);
|
cl_assert_strequal("hahaha", values[4]);
|
||||||
cl_assert(GIT_ATTR_TRUE(values[5]));
|
cl_assert(GIT_ATTR_TRUE(values[5]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
BIN
tests/resources/attr/sub/sub/.gitattributes
vendored
Normal file
BIN
tests/resources/attr/sub/sub/.gitattributes
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user