X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=t%2Fhtmlbalance.t;h=e5a5db0ee949e5b2935b03d49a4017a096a1c2c5;hb=f77452b7caa7346625882d20f396b7154cda6a54;hp=cd124e473068d8fc01a31c41c1faa777dee0386d;hpb=2d857e6aeb8eb959551f292578bfe4bf66cc16f1;p=ikiwiki.git
diff --git a/t/htmlbalance.t b/t/htmlbalance.t
index cd124e473..e5a5db0ee 100755
--- a/t/htmlbalance.t
+++ b/t/htmlbalance.t
@@ -1,9 +1,19 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 7;
-BEGIN { use_ok("IkiWiki::Plugin::htmlbalance"); }
+BEGIN {
+ eval q{
+ use HTML::TreeBuilder;
+ };
+ if ($@) {
+ eval q{use Test::More skip_all => "HTML::TreeBuilder not available"};
+ }
+ else {
+ eval q{use Test::More tests => 7};
+ }
+ use_ok("IkiWiki::Plugin::htmlbalance");
+}
is(IkiWiki::Plugin::htmlbalance::sanitize(content => "
"), "
");
is(IkiWiki::Plugin::htmlbalance::sanitize(content => "
hello world
hello world