aboutsummaryrefslogtreecommitdiff
path: root/t/pagespec_match.t
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-04-24 13:49:15 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-04-24 13:49:15 -0400
commit7d7f85bbb5ec48a193973ef2dbe6d78a2f4f8ea8 (patch)
tree59d657a93f264a88a418472ef3a17f11387007a1 /t/pagespec_match.t
parent827f6b9bfc7ad0d3834078d53bf239e3331218ce (diff)
downloadikiwiki-7d7f85bbb5ec48a193973ef2dbe6d78a2f4f8ea8.tar
ikiwiki-7d7f85bbb5ec48a193973ef2dbe6d78a2f4f8ea8.tar.gz
Correct a bug in pagespec matching, where a empty pagespec matched all pages.
This manifested as wikis with no locked pages treating them all as locked. The bug was introduced in version 2.41. Medium urgency upload due to above fix.
Diffstat (limited to 't/pagespec_match.t')
-rwxr-xr-xt/pagespec_match.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/pagespec_match.t b/t/pagespec_match.t
index 038472967..ee255b471 100755
--- a/t/pagespec_match.t
+++ b/t/pagespec_match.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 52;
+use Test::More tests => 54;
BEGIN { use_ok("IkiWiki"); }
@@ -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