X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e7a840ed9a817cf4db59c90e680afd89e146b581..185fe03b3804c9608ecf73ef84eb65f06b2dee19:/t/htmlbalance.t

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 => "<br></br>"), "<br />");
 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "<div><p b=\"c\">hello world</div>"), "<div><p b=\"c\">hello world</p></div>");