Fix a bug where looking up non-existant files croaks, instead of propagating

the error back up and trapping it.
This commit is contained in:
Colin Kuskie 2008-08-15 22:46:46 +00:00
parent 69ca406b38
commit b143a8db6a
3 changed files with 25 additions and 3 deletions

View file

@ -20,7 +20,7 @@ use File::Spec;
my $session = WebGUI::Test->session;
my $numTests = 1; ##For conditional load check
my $langTests = 2; ##For language look-up tests
my $langTests = 4; ##For language look-up tests
$numTests += 11 + $langTests;
plan tests => $numTests;
@ -66,6 +66,16 @@ SKIP: {
'ebGUIWay',
'Language check: existing key returns native language key'
);
is(
$i18n->get('104','Asset','PigLatin'),
$i18n->get('104', 'WebGUI', 'English'),
'Language check: key from missing file return English key'
);
is(
$i18n->get('neverAValidKey','notAValidFile','PigLatin'),
'',
'Language check: key from non-existant file returns an empty string'
);
}