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