]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - t/htmlbalance.t
Merge branch 'master' of git://git.ikiwiki.info
[git.ikiwiki.info.git] / t / htmlbalance.t
index cd124e473068d8fc01a31c41c1faa777dee0386d..e5a5db0ee949e5b2935b03d49a4017a096a1c2c5 100755 (executable)
@@ -1,9 +1,19 @@
 #!/usr/bin/perl
 use warnings;
 use strict;
 #!/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 => "<br></br>"), "<br />");
 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "<div><p b=\"c\">hello world</div>"), "<div><p b=\"c\">hello world</p></div>");
 
 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "<br></br>"), "<br />");
 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "<div><p b=\"c\">hello world</div>"), "<div><p b=\"c\">hello world</p></div>");