]> sipb.mit.edu Git - ikiwiki.git/blobdiff - t/preprocess.t
postsparkline and progress: also contentless dependencies
[ikiwiki.git] / t / preprocess.t
index 7699f56baaa77737115fabe033e73e06383966e8..e5026ed64b575ba8ed2215e468bb322d4086f020 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use warnings;
 use strict;
-use Test::More tests => 19;
+use Test::More tests => 21;
 
 BEGIN { use_ok("IkiWiki"); }
 
@@ -51,6 +51,11 @@ is(IkiWiki::preprocess("foo", "foo", '[[foo a="""'.$multiline.'""" b="foo"]]', 0
        "foo(a => $multiline, b => foo)");
 is(IkiWiki::preprocess("foo", "foo", '[[foo a="""'."\n".$multiline."\n".'""" b="foo"]]', 0, 0),
        "foo(a => $multiline, b => foo)", "leading/trailing newline stripped");
+my $long='[[foo a="""'.("a" x 100000).'';
+is(IkiWiki::preprocess("foo", "foo", $long, 0, 0), $long,
+       "unterminated triple-quoted string inside unterminated directive(should not warn about over-recursion)");
+is(IkiWiki::preprocess("foo", "foo", $long."]]", 0, 0), $long."]]",
+       "unterminated triple-quoted string is not treated as a bare word");
 
 TODO: {
        local $TODO = "nested strings not yet implemented";