From: Micah Cowan Date: Wed, 19 Mar 2008 22:48:54 +0000 (-0700) Subject: More tests for directory include/exclude. X-Git-Tag: v1.13~445^2 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=aed227e9033f7bedc438db4ea807ca33062c89b3 More tests for directory include/exclude. --- diff --git a/src/ChangeLog b/src/ChangeLog index b6169204..c6159ca3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-03-19 Micah Cowan + + * utils.c (test_dir_matches_p): More tests related for + dir_matches_p. + 2008-03-17 Micah Cowan * connect.c: Include sys/time.h to support use of the select diff --git a/src/utils.c b/src/utils.c index 920f3b54..8c56d4db 100644 --- a/src/utils.c +++ b/src/utils.c @@ -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)