aboutsummaryrefslogtreecommitdiff
path: root/t/preprocess.t
diff options
context:
space:
mode:
authorTimo Paulssen <timonator@perpetuum-immobile.de>2011-05-01 02:04:36 +0200
committerJoey Hess <joey@kitenet.net>2011-05-13 11:24:16 -0400
commit505439cc0abe814a9dffd24224b8b660db0d3624 (patch)
treea25eb8661ff0c8a2cb1c81375f21f1e7f9b693d1 /t/preprocess.t
parent635f5284671b5f97531155ac004663c9a180a2d4 (diff)
downloadikiwiki-505439cc0abe814a9dffd24224b8b660db0d3624.tar
ikiwiki-505439cc0abe814a9dffd24224b8b660db0d3624.tar.gz
simple tests for heredoc.
Diffstat (limited to 't/preprocess.t')
-rwxr-xr-xt/preprocess.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/preprocess.t b/t/preprocess.t
index 7bb9878d0..4a140bb61 100755
--- a/t/preprocess.t
+++ b/t/preprocess.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 31;
+use Test::More tests => 33;
BEGIN { use_ok("IkiWiki"); }
@@ -67,6 +67,11 @@ is(IkiWiki::preprocess("foo", "foo", $long, 0, 0), $long,
is(IkiWiki::preprocess("foo", "foo", $long."]]", 0, 0), $long."]]",
"unterminated triple-quoted string is not treated as a bare word");
+is(IkiWiki::preprocess("foo", "foo", "[[!foo a=<<HEREDOC\n".$multiline."\nHERE]]", 0, 0),
+ "foo(a => $multiline)", "heredoc for key");
+is(IkiWiki::preprocess("foo", "foo", "[[!foo <<HEREDOC\n".$multiline."\nHERE]]", 0, 0),
+ "foo($multiline)", "heredoc for keyless");
+
TODO: {
local $TODO = "nested strings not yet implemented";