summaryrefslogtreecommitdiff
path: root/t/globlist_match.t
blob: b60d83a2a09d579732f6e8f93f9108ffa25fe94c (plain)
  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. use Test::More tests => 13;
  5. BEGIN { use_ok("IkiWiki"); }
  6. ok(IkiWiki::globlist_match("foo", "foo bar"), "simple list");
  7. ok(IkiWiki::globlist_match("bar", "foo bar"), "simple list 2");
  8. ok(IkiWiki::globlist_match("foo", "*"));
  9. ok(IkiWiki::globlist_match("foo", "f?? !foz"));
  10. ok(! IkiWiki::globlist_match("foo", "f?? !foo"));
  11. ok(! IkiWiki::globlist_match("foo", "* !foo"));
  12. ok(! IkiWiki::globlist_match("foo", "foo !foo"));
  13. ok(IkiWiki::globlist_match("page", "?ag?"));
  14. ok(! IkiWiki::globlist_match("page", "?a?g?"));
  15. ok(! IkiWiki::globlist_match("foo.png", "* !*.*"));
  16. ok(IkiWiki::globlist_match("foo.png", "*.*"));
  17. ok(! IkiWiki::globlist_match("foo", "*.*"));