blob: b60d83a2a09d579732f6e8f93f9108ffa25fe94c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/usr/bin/perl
use warnings;
use strict;
use Test::More tests => 13;
BEGIN { use_ok("IkiWiki"); }
ok(IkiWiki::globlist_match("foo", "foo bar"), "simple list");
ok(IkiWiki::globlist_match("bar", "foo bar"), "simple list 2");
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", "*.*"));
|