hydra/t/Hydra/Helper/CatalystUtils.t
Graham Christensen a5d1d36fa6 Tests: restructure to more closely mirror the sources
t/ had lots of directories and files mirroring src/lib/Hydra. This moves
those files under t/Hydra
2022-01-10 15:34:52 -05:00

28 lines
582 B
Perl

use strict;
use warnings;
use Setup;
use Test2::V0;
use Hydra::Helper::CatalystUtils;
subtest "trim" => sub {
my %values = (
"" => "",
"🌮" => '🌮',
" 🌮" => '🌮',
"🌮 " => '🌮',
" 🌮 " => '🌮',
"\n🌮 " => '🌮',
"\n\t🌮\n\n\t" => '🌮',
);
for my $input (keys %values) {
my $value = $values{$input};
is(trim($input), $value, "Trim the value: " . $input);
}
my $uninitialized;
is(trim($uninitialized), '', "Trimming an uninitialized value");
};
done_testing;