]> sjero.net Git - wget/commitdiff
More tests for directory include/exclude.
authorMicah Cowan <micah@cowan.name>
Wed, 19 Mar 2008 22:48:54 +0000 (15:48 -0700)
committerMicah Cowan <micah@cowan.name>
Wed, 19 Mar 2008 22:48:54 +0000 (15:48 -0700)
src/ChangeLog
src/utils.c

index b6169204b264d4dc9f7af89fb92efcfb065c4fdc..c6159ca353a0e4edd8085d7cadb2513180351182 100644 (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
index 920f3b54482f0232c4a26b62e988e19a516686e2..8c56d4dbf5772ae3f9dbf4e91c5f47960c35dd0c 100644 (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)