From aed227e9033f7bedc438db4ea807ca33062c89b3 Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Wed, 19 Mar 2008 15:48:54 -0700 Subject: [PATCH] More tests for directory include/exclude. --- src/ChangeLog | 5 +++++ src/utils.c | 8 ++++++++ 2 files changed, 13 insertions(+) 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) -- 2.39.2