Skip to content

Commit 596288b

Browse files
committed
tests/clock.test: added test illustrating bug [tcl:2c0f49e26c27847a] - cache becomes inconsistent when deriving localized formats (e. g. %x)
1 parent f4e8bff commit 596288b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/clock.test

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35500,6 +35500,18 @@ test clock-29.1812 {parsing of several localized formats} {
3550035500
}
3550135501
set res
3550235502
} [lrepeat 12 0]
35503+
35504+
test clock-29.1813 {cache consistency when deriving localized formats, bug [2c0f49e26c27847a]} {
35505+
# ensure localized formats are not affected by mistaken merge of mc
35506+
# from parent locale, so such formats got invalidated in child cache:
35507+
namespace inscope ::tcl::clock {
35508+
::msgcat::mcset en_US_roman_xx DATE_FORMAT "%d.%m.%Y"
35509+
::msgcat::mcset en_US_roman_xx_yy DATE_FORMAT "%Y|%m|%d"
35510+
}
35511+
list [clock format 86400 -format %x -gmt 1 -locale en_US_roman] \
35512+
[clock format 86400 -format %x -gmt 1 -locale en_US_roman_xx] \
35513+
[clock format 86400 -format %x -gmt 1 -locale en_US_roman_xx_yy]
35514+
} {01/02/1970 02.01.1970 1970|01|02}
3550335515
# END testcases29
3550435516

3550535517

0 commit comments

Comments
 (0)