use
strict;
use
warnings;
use
English;
use
Test::NoWarnings;
# Test.
my
$self
= {
'key'
=>
'Latin Extended-A'
,
};
my
$ret
= check_unicode_block(
$self
,
'key'
);
is(
$ret
,
undef
,
'Right Unicode block is present (Latin Extended-A).'
);
# Test.
$self
= {};
$ret
= check_unicode_block(
$self
,
'key'
);
is(
$ret
,
undef
,
'No Unicode block is present.'
);
# Test.
$self
= {
'key'
=>
'bad'
,
};
eval
{
check_unicode_block(
$self
,
'key'
);
};
is(
$EVAL_ERROR
,
"Parameter 'key' contains invalid Unicode block.\n"
,
"Parameter 'key' contains invalid Unicode block (bad)."
);
clean();