From e7a840ed9a817cf4db59c90e680afd89e146b581 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 16 Nov 2008 18:11:39 +0000 Subject: htmlbalance: new plugin that balances tags by parsing and re-serializing --- t/htmlbalance.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 t/htmlbalance.t (limited to 't/htmlbalance.t') diff --git a/t/htmlbalance.t b/t/htmlbalance.t new file mode 100755 index 000000000..cd124e473 --- /dev/null +++ b/t/htmlbalance.t @@ -0,0 +1,13 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 7; + +BEGIN { use_ok("IkiWiki::Plugin::htmlbalance"); } + +is(IkiWiki::Plugin::htmlbalance::sanitize(content => "

"), "
"); +is(IkiWiki::Plugin::htmlbalance::sanitize(content => "

hello world

"), "

hello world

"); +is(IkiWiki::Plugin::htmlbalance::sanitize(content => ""), ""); +is(IkiWiki::Plugin::htmlbalance::sanitize(content => "foo "), "foo "); +is(IkiWiki::Plugin::htmlbalance::sanitize(content => " foo "), " foo "); +is(IkiWiki::Plugin::htmlbalance::sanitize(content => "a>"), "a>"); -- cgit v1.2.3