X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/122f6df3259e8ca1dd96554d08cebce4b5c55acc..3d609928e5d166897f26d2afe1b39e518f67a22c:/t/preprocess.t diff --git a/t/preprocess.t b/t/preprocess.t index 7699f56ba..e5026ed64 100755 --- a/t/preprocess.t +++ b/t/preprocess.t @@ -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";