add a test for makeArrayTabSafe and add comments to WebGUI::Utility

This commit is contained in:
Colin Kuskie 2007-11-16 05:16:44 +00:00
parent b07956fa06
commit d566d0db8c
2 changed files with 13 additions and 2 deletions

View file

@ -17,7 +17,8 @@ use Tie::IxHash;
use WebGUI::Test;
use WebGUI::Session;
use Test::More tests => 43; # increment this value for each test you create
use Test::More tests => 44; # increment this value for each test you create
use Test::Deep;
my $session = WebGUI::Test->session;
@ -77,6 +78,15 @@ is(
'makeCommaSafe(): clearing tabs, newlines and carriage returns'
);
# makeArrayTabSafe -- modifies an array in place
my $tabbedArray = ["this\tthat", "these\nthose"];
WebGUI::Utility::makeArrayTabSafe($tabbedArray);
cmp_deeply(
$tabbedArray,
["this that", "these those"],
'makeArrayTabSafe'
);
# randint
my $number = WebGUI::Utility::randint(50,75);
ok($number >= 50 && $number <= 75, 'randint()');