Variable hour formats don't add an extra space any longer. Fixes bug #11915.
This commit is contained in:
parent
dac8186244
commit
19a87ea003
5 changed files with 20 additions and 9 deletions
|
|
@ -17,7 +17,7 @@ use File::Spec;
|
|||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
|
||||
use Test::More tests => 92; # increment this value for each test you create
|
||||
use Test::More tests => 95; # increment this value for each test you create
|
||||
|
||||
installBadLocale();
|
||||
WebGUI::Test->addToCleanup(sub { unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n BadLocale.pm/); });
|
||||
|
|
@ -298,9 +298,15 @@ cmp_ok(
|
|||
|
||||
$dude->profileField('language', 'BadLocale');
|
||||
$session->user({user => $dude});
|
||||
is($dt->epochToHuman($wgbday), '8/16/2001 9:00 pm', 'epochToHuman: constructs a default locale if the language does not provide one.');
|
||||
is($dt->epochToHuman($wgbday), '8/16/2001 9:00 pm', 'epochToHuman: constructs a default locale if the language does not provide one.');
|
||||
$session->user({userId => 1});
|
||||
|
||||
##Variable digit days, months and hours
|
||||
is($dt->epochToHuman($wgbday,'%M'), '8', '... single digit month');
|
||||
my $dayEpoch = DateTime->from_epoch(epoch => $wgbday)->subtract(days => 10)->epoch;
|
||||
is($dt->epochToHuman($dayEpoch,'%D'), '6', '... single digit day');
|
||||
is($dt->epochToHuman($dayEpoch,'%H'), '8', '... single digit hour');
|
||||
|
||||
sub installBadLocale {
|
||||
copy(
|
||||
WebGUI::Test->getTestCollateralPath('BadLocale.pm'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue