diff options
author | Josh Triplett <josh@freedesktop.org> | 2008-01-27 16:13:54 -0800 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2008-01-27 16:14:38 -0800 |
commit | 1b03a06c8c0dbf59469ff30d09a0c9c3051e0b00 (patch) | |
tree | 06f20b766475a98f7881aa962f0c8a494c87908b /t/preprocess.t | |
parent | fafb2edaa7aeb1293e716fa96f087cb713f4a70a (diff) | |
download | ikiwiki-1b03a06c8c0dbf59469ff30d09a0c9c3051e0b00.tar ikiwiki-1b03a06c8c0dbf59469ff30d09a0c9c3051e0b00.tar.gz |
Add new preprocessor directive syntax¸ using a '!' prefix.
Add a prefix_directives option to the setup file to turn this syntax
on; currently defaults to false, for backward compatibility. Support
optional '!' prefix even with prefix_directives off, and use that in
the underlay to support either setting of prefix_directives. Add NEWS
entry with migration information.
Diffstat (limited to 't/preprocess.t')
-rwxr-xr-x | t/preprocess.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/preprocess.t b/t/preprocess.t index 9b029281f..7699f56ba 100755 --- a/t/preprocess.t +++ b/t/preprocess.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 17; +use Test::More tests => 19; BEGIN { use_ok("IkiWiki"); } @@ -23,6 +23,8 @@ $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 ]]", 0, 0), "foo()", "prefixed"); +is(IkiWiki::preprocess("foo", "foo", "[[!foo]]", 0, 0), "[[!foo]]", "prefixed, no space"); 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), |