From e84c58bd661ede2e9696f9d6db2bf0164eef3f8b Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 29 Jul 2006 04:03:17 +0000 Subject: [PATCH] prototyping conditional tests based on Macro load. There is no sense running the tests if there are syntax errors in the code. --- t/Macro/International.t | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/t/Macro/International.t b/t/Macro/International.t index 9d5990896..8249a280d 100644 --- a/t/Macro/International.t +++ b/t/Macro/International.t @@ -13,7 +13,6 @@ use strict; use lib "$FindBin::Bin/../lib"; use WebGUI::Test; -use WebGUI::Macro::International; use WebGUI::Session; use Data::Dumper; @@ -44,11 +43,19 @@ my @testSets = ( }, ); -my $numTests = scalar @testSets; +my $numTests = scalar @testSets + 1; plan tests => $numTests; +my $loaded = use_ok('WebGUI::Macro::International'); + +SKIP: { + +skip 'Module was not loaded, skipping all tests', $numTests -1 unless $loaded; + foreach my $testSet (@testSets) { my $output = WebGUI::Macro::International::process($session, @{ $testSet->{input} }); is($output, $testSet->{output}, $testSet->{comment} ); } + +}