add a test for makeArrayTabSafe and add comments to WebGUI::Utility
This commit is contained in:
parent
b07956fa06
commit
d566d0db8c
2 changed files with 13 additions and 2 deletions
12
t/Utility.t
12
t/Utility.t
|
|
@ -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()');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue