Conditional load conversion.

In Page.t, place the newly created Snippet under a versionTag
so that it can be cleaned up at the end of the test.
This commit is contained in:
Colin Kuskie 2006-07-30 18:34:47 +00:00
parent d154726bc1
commit dd9c807166
9 changed files with 124 additions and 26 deletions

View file

@ -15,7 +15,6 @@ use strict;
use lib "$FindBin::Bin/../lib";
use WebGUI::Test;
use WebGUI::Macro::Hash_userId;
use WebGUI::Session;
use Data::Dumper;
@ -36,10 +35,21 @@ my @testSets = (
my $numTests = scalar @testSets;
$numTests += 1; #For the use_ok
plan tests => $numTests;
my $macro = 'WebGUI::Macro::Hash_userId';
my $loaded = use_ok($macro);
SKIP: {
skip "Unable to load $macro", $numTests-1 unless $loaded;
foreach my $testSet (@testSets) {
$session->user({userId => $testSet->{userId}});
my $output = WebGUI::Macro::Hash_userId::process($session);
is($output, $testSet->{userId}, 'testing '.$testSet->{comment});
}
}