diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-06-02 05:08:33 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-06-02 05:08:33 +0000 |
commit | 7e3cfbb8a475189fb100990cff348647fce4b63f (patch) | |
tree | 557cf8bc9e577372f68d6b1f355e411466bad0e5 /t | |
parent | bf228acd0a17dc912e51fcaf84e2d6cfa1b465b3 (diff) | |
download | ikiwiki-7e3cfbb8a475189fb100990cff348647fce4b63f.tar ikiwiki-7e3cfbb8a475189fb100990cff348647fce4b63f.tar.gz |
couple more
Diffstat (limited to 't')
-rwxr-xr-x | t/preprocess.t | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/preprocess.t b/t/preprocess.t index e1afa4a26..9b029281f 100755 --- a/t/preprocess.t +++ b/t/preprocess.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 14; +use Test::More tests => 17; BEGIN { use_ok("IkiWiki"); } @@ -24,11 +24,16 @@ $IkiWiki::hooks{preprocess}{foo}{call}=sub { is(IkiWiki::preprocess("foo", "foo", "[[foo]]", 0, 0), "[[foo]]", "not wikilink"); is(IkiWiki::preprocess("foo", "foo", "[[foo ]]", 0, 0), "foo()", "simple"); is(IkiWiki::preprocess("foo", "foo", "[[foo a=1]]", 0, 0), "foo(a => 1)"); +is(IkiWiki::preprocess("foo", "foo", "[[foo a=\"1 2 3 4\"]]", 0, 0), "foo(a => 1 2 3 4)"); is(IkiWiki::preprocess("foo", "foo", "[[foo ]] then [[foo a=2]]", 0, 0), "foo() then foo(a => 2)"); -is(IkiWiki::preprocess("foo", "foo", "[[foo b c \"d\"]]", 0, 0), "foo(b, c, d)"); +is(IkiWiki::preprocess("foo", "foo", "[[foo b c \"d and e=f\"]]", 0, 0), "foo(b, c, d and e=f)"); is(IkiWiki::preprocess("foo", "foo", "[[foo a=1 b c=1]]", 0, 0), "foo(a => 1, b, c => 1)"); +is(IkiWiki::preprocess("foo", "foo", "[[foo a=1 b c=1 \t\t]]", 0, 0), + "foo(a => 1, b, c => 1)", "whitespace"); +is(IkiWiki::preprocess("foo", "foo", "[[foo a=1\nb \nc=1]]", 0, 0), + "foo(a => 1, b, c => 1)", "multiline directive"); is(IkiWiki::preprocess("foo", "foo", "[[foo a=1 a=2 a=3]]", 0, 0), "foo(a => 1, a => 2, a => 3)", "dup item"); is(IkiWiki::preprocess("foo", "foo", '[[foo a="[[bracketed]]" b=1]]', 0, 0), |