]> sipb.mit.edu Git - ikiwiki.git/blobdiff - t/pagespec_match.t
fix regression test
[ikiwiki.git] / t / pagespec_match.t
index cb98ab1498adc387a443ea8e25c3bc6a846d5553..9d55737470fd122b42aeb2d64c53d378e7501e95 100755 (executable)
@@ -51,6 +51,8 @@ ok(pagespec_match("examples/softwaresite/bugs/fails_to_frobnicate",
 ok(! pagespec_match("foo", "link(./bar)", location => "foo/bar"), "link relative fail");
 ok(pagespec_match("bar", "backlink(foo)"), "backlink");
 ok(! pagespec_match("quux", "backlink(foo)"), "failed backlink");
+ok(! pagespec_match("bar", ""), "empty pagespec should match nothing");
+ok(! pagespec_match("bar", "           "), "blank pagespec should match nothing");
 
 $IkiWiki::pagectime{foo}=1154532692; # Wed Aug  2 11:26 EDT 2006
 $IkiWiki::pagectime{bar}=1154532695; # after
@@ -69,7 +71,7 @@ ok(! pagespec_match("foo", "no_such_function(foo)"), "foo");
 
 my $ret=pagespec_match("foo", "(invalid");
 ok(! $ret, "syntax error");
-ok($ret eq "syntax error", "error message");
+ok($ret =~ /syntax error/, "error message");
 
 # old style globlists
 ok(pagespec_match("foo", "foo bar"), "simple list");