4 use Test::More tests => 20;
6 BEGIN { use_ok("IkiWiki"); }
8 ok(IkiWiki::pagespec_match("foo", "*"));
9 ok(IkiWiki::pagespec_match("page", "?ag?"));
10 ok(! IkiWiki::pagespec_match("page", "?a?g?"));
11 ok(IkiWiki::pagespec_match("foo.png", "*.*"));
12 ok(! IkiWiki::pagespec_match("foo", "*.*"));
13 ok(IkiWiki::pagespec_match("foo", "foo or bar"), "simple list");
14 ok(IkiWiki::pagespec_match("bar", "foo or bar"), "simple list 2");
15 ok(IkiWiki::pagespec_match("foo", "f?? and !foz"));
16 ok(! IkiWiki::pagespec_match("foo", "f?? and !foo"));
17 ok(! IkiWiki::pagespec_match("foo", "* and !foo"));
18 ok(! IkiWiki::pagespec_match("foo", "foo and !foo"));
19 ok(! IkiWiki::pagespec_match("foo.png", "* and !*.*"));
22 ok(IkiWiki::pagespec_match("foo", "foo bar"), "simple list");
23 ok(IkiWiki::pagespec_match("bar", "foo bar"), "simple list 2");
24 ok(IkiWiki::pagespec_match("foo", "f?? !foz"));
25 ok(! IkiWiki::pagespec_match("foo", "f?? !foo"));
26 ok(! IkiWiki::pagespec_match("foo", "* !foo"));
27 ok(! IkiWiki::pagespec_match("foo", "foo !foo"));
28 ok(! IkiWiki::pagespec_match("foo.png", "* !*.*"));