prototyping conditional tests based on Macro load. There is no sense running the tests if there are syntax errors in the code.
This commit is contained in:
parent
be6fc4b4f9
commit
e84c58bd66
1 changed files with 9 additions and 2 deletions
|
|
@ -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} );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue