Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
635f528
)
simple tests for heredoc.
author
Timo Paulssen
<timonator@perpetuum-immobile.de>
Sun, 1 May 2011 00:04:36 +0000
(
02:04
+0200)
committer
Joey Hess
<joey@kitenet.net>
Fri, 13 May 2011 15:24:16 +0000
(11:24 -0400)
t/preprocess.t
patch
|
blob
|
history
diff --git
a/t/preprocess.t
b/t/preprocess.t
index 7bb9878d0fdbfd16d2db04af6190bf11209c50c2..4a140bb610f233d11e0668c7bbb98ae21465086a 100755
(executable)
--- a/
t/preprocess.t
+++ b/
t/preprocess.t
@@
-1,7
+1,7
@@
#!/usr/bin/perl
use warnings;
use strict;
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 3
1
;
+use Test::More tests => 3
3
;
BEGIN { use_ok("IkiWiki"); }
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", $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";
TODO: {
local $TODO = "nested strings not yet implemented";