Added corner tests for empty string and undef.
Converted tests to handle skipping if the macro can't be loaded.
This commit is contained in:
parent
818ab4a690
commit
78c33c54ff
5 changed files with 81 additions and 10 deletions
|
|
@ -53,12 +53,30 @@ my @testSets = (
|
|||
|
||||
my $numTests = scalar @testSets;
|
||||
|
||||
plan tests => $numTests + 2;
|
||||
$numTests += 1; ##use_ok
|
||||
$numTests += 1; ##testBlock has no name collisions
|
||||
$numTests += 3; ##TODO block
|
||||
|
||||
use_ok('WebGUI::Macro::FormParam');
|
||||
plan tests => $numTests;
|
||||
|
||||
my $macro = 'WebGUI::Macro::FormParam';
|
||||
my $loaded = use_ok($macro);
|
||||
|
||||
SKIP: {
|
||||
|
||||
skip "Unable to load $macro", $numTests-1 unless $loaded;
|
||||
|
||||
auto_check($session, \@testSets);
|
||||
|
||||
}
|
||||
|
||||
TODO: {
|
||||
local $TODO = "Tests to write later";
|
||||
ok(0, "What will this do with a non-existant form param?");
|
||||
ok(0, "Also try null");
|
||||
ok(0, "Also try undef");
|
||||
}
|
||||
|
||||
sub auto_check {
|
||||
my ($session, $testBlock) = @_;
|
||||
my $origSessionRequest = $session->{_request};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue