]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - t/globlist_match.t
* Add a run_hooks function for the common task of running all hooks of a
[git.ikiwiki.info.git] / t / globlist_match.t
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Test::More tests => 13;
6 BEGIN { use_ok("IkiWiki"); }
7 ok(IkiWiki::globlist_match("foo", "foo bar"), "simple list");
8 ok(IkiWiki::globlist_match("bar", "foo bar"), "simple list 2");
9 ok(IkiWiki::globlist_match("foo", "*"));
10 ok(IkiWiki::globlist_match("foo", "f?? !foz"));
11 ok(! IkiWiki::globlist_match("foo", "f?? !foo"));
12 ok(! IkiWiki::globlist_match("foo", "* !foo"));
13 ok(! IkiWiki::globlist_match("foo", "foo !foo"));
14 ok(IkiWiki::globlist_match("page", "?ag?"));
15 ok(! IkiWiki::globlist_match("page", "?a?g?"));
16 ok(! IkiWiki::globlist_match("foo.png", "* !*.*"));
17 ok(IkiWiki::globlist_match("foo.png", "*.*"));
18 ok(! IkiWiki::globlist_match("foo", "*.*"));