summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGianni Ceccarelli <dakkar@dechirico.(none)>2009-03-27 13:05:30 +0100
committerGianni Ceccarelli <dakkar@dechirico.(none)>2009-03-27 13:05:30 +0100
commit20c06e6cc40ff498e12cc5a928919ce914ba9512 (patch)
treef5446d5ed731431d10891583d30645a9008e8ecc
parentLibXML with namespace support, and fixed tests (diff)
downloadTree-Template-Declare-20c06e6cc40ff498e12cc5a928919ce914ba9512.tar.gz
Tree-Template-Declare-20c06e6cc40ff498e12cc5a928919ce914ba9512.tar.bz2
Tree-Template-Declare-20c06e6cc40ff498e12cc5a928919ce914ba9512.zip
skip tests when modules are not present
-rw-r--r--t/02-xslt.t3
-rw-r--r--t/03-html.t7
-rw-r--r--t/04-xml.t7
3 files changed, 13 insertions, 4 deletions
diff --git a/t/02-xslt.t b/t/02-xslt.t
index 49e617a..88fb73e 100644
--- a/t/02-xslt.t
+++ b/t/02-xslt.t
@@ -5,6 +5,7 @@ BEGIN {
eval 'use Tree::DAG_Node::XPath; require Tree::Transform::XSLTish';
plan skip_all => 'Tree::DAG_Node::XPath and Tree::Transform::XSLTish needed for this test' if $@;
}
+plan tests => 1;
package Copy;{
use Tree::Transform::XSLTish;
@@ -35,8 +36,6 @@ use warnings;
use Tree::Template::Declare options => {builder => Tree::Template::Declare::DAG_Node->new('Tree::DAG_Node::XPath') };
use Data::Dumper;
-plan tests=>1;
-
sub Tree::DAG_Node::XPath::Root::xpath_get_root_node { return $_[0] }
sub Tree::DAG_Node::XPath::Root::xpath_get_parent_node { return }
diff --git a/t/03-html.t b/t/03-html.t
index 8504c90..27cac64 100644
--- a/t/03-html.t
+++ b/t/03-html.t
@@ -1,5 +1,10 @@
#!perl
-use Test::Most 'no_plan','die';
+use Test::Most 'die';
+BEGIN {
+eval 'use HTML::Element';
+plan skip_all => 'HTML::Element needed for this test' if $@;
+}
+plan tests => 1;
use strict;
use warnings;
use Tree::Template::Declare options => {builder => '+HTML_Element'};
diff --git a/t/04-xml.t b/t/04-xml.t
index 5281e46..9ec5924 100644
--- a/t/04-xml.t
+++ b/t/04-xml.t
@@ -1,5 +1,10 @@
#!perl
-use Test::Most 'no_plan','die';
+use Test::Most 'die';
+BEGIN {
+eval 'use XML::LibXML';
+plan skip_all => 'XML::LibXML needed for this test' if $@;
+}
+plan tests => 2;
use strict;
use warnings;
use Tree::Template::Declare options => {builder => '+LibXML'};