More tests for directory include/exclude.

This commit is contained in:
Micah Cowan 2008-03-19 15:48:54 -07:00
parent 1db9f1e9ac
commit aed227e903
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-03-19 Micah Cowan <micah@cowan.name>
* utils.c (test_dir_matches_p): More tests related for
dir_matches_p.
2008-03-17 Micah Cowan <micah@cowan.name>
* connect.c: Include sys/time.h to support use of the select

View File

@ -2175,7 +2175,15 @@ test_dir_matches_p()
{ { "/somedir", "/someotherdir", NULL }, "anotherdir", false },
{ { "/somedir", "/*otherdir", NULL }, "anotherdir", true },
{ { "/somedir/d1", "/someotherdir", NULL }, "somedir/d1", true },
{ { "*/*d1", "/someotherdir", NULL }, "somedir/d1", true },
{ { "/somedir/d1", "/someotherdir", NULL }, "d1", false },
{ { "!COMPLETE", NULL, NULL }, "!COMPLETE", true },
{ { "*COMPLETE", NULL, NULL }, "!COMPLETE", true },
{ { "*/!COMPLETE", NULL, NULL }, "foo/!COMPLETE", true },
{ { "*COMPLETE", NULL, NULL }, "foo/!COMPLETE", false },
{ { "*/*COMPLETE", NULL, NULL }, "foo/!COMPLETE", true },
{ { "/dir with spaces", NULL, NULL }, "dir with spaces", true },
{ { "/dir*with*spaces", NULL, NULL }, "dir with spaces", true },
};
for (i = 0; i < countof(test_array); ++i)