]> sipb.mit.edu Git - ikiwiki.git/commitdiff
add test case for multiline pagespec
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 21 May 2009 16:44:21 +0000 (12:44 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 21 May 2009 16:44:21 +0000 (12:44 -0400)
t/pagespec_match.t

index 4cf6fa1ff810c2f1dc09f772b57f5f16805fa53e..64408f4898cb8b0671ba24fb7f2f8433e87dacae 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use warnings;
 use strict;
 #!/usr/bin/perl
 use warnings;
 use strict;
-use Test::More tests => 53;
+use Test::More tests => 54;
 
 BEGIN { use_ok("IkiWiki"); }
 
 
 BEGIN { use_ok("IkiWiki"); }
 
@@ -20,6 +20,15 @@ ok(! pagespec_match("foo", "* and !foo"));
 ok(! pagespec_match("foo", "foo and !foo"));
 ok(! pagespec_match("foo.png", "* and !*.*"));
 ok(pagespec_match("foo", "(bar or ((meep and foo) or (baz or foo) or beep))"));
 ok(! pagespec_match("foo", "foo and !foo"));
 ok(! pagespec_match("foo.png", "* and !*.*"));
 ok(pagespec_match("foo", "(bar or ((meep and foo) or (baz or foo) or beep))"));
+ok(pagespec_match("foo", "(
+       bar
+       or (
+               (meep and foo)
+               or
+               (baz or foo)
+               or beep
+       )
+)"), "multiline complex pagespec");
 ok(! pagespec_match("a/foo", "foo", location => "a/b"), "nonrelative fail");
 ok(! pagespec_match("foo", "./*", location => "a/b"), "relative fail");
 ok(pagespec_match("a/foo", "./*", location => "a/b"), "relative");
 ok(! pagespec_match("a/foo", "foo", location => "a/b"), "nonrelative fail");
 ok(! pagespec_match("foo", "./*", location => "a/b"), "relative fail");
 ok(pagespec_match("a/foo", "./*", location => "a/b"), "relative");