diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/globlist_match.t | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/globlist_match.t b/t/globlist_match.t new file mode 100755 index 000000000..3d196e09c --- /dev/null +++ b/t/globlist_match.t @@ -0,0 +1,16 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 11; + +BEGIN { use_ok("IkiWiki"); } +ok(IkiWiki::globlist_match("foo", "*")); +ok(IkiWiki::globlist_match("foo", "f?? !foz")); +ok(! IkiWiki::globlist_match("foo", "f?? !foo")); +ok(! IkiWiki::globlist_match("foo", "* !foo")); +ok(! IkiWiki::globlist_match("foo", "foo !foo")); +ok(IkiWiki::globlist_match("page", "?ag?")); +ok(! IkiWiki::globlist_match("page", "?a?g?")); +ok(! IkiWiki::globlist_match("foo.png", "* !*.*")); +ok(IkiWiki::globlist_match("foo.png", "*.*")); +ok(! IkiWiki::globlist_match("foo", "*.*")); |