summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2015-10-23 08:12:53 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2015-10-23 08:12:53 (GMT)
commitc6fd11389a8714a5c44bbb3ce9d6ff0b8d49f7ae (patch)
tree671983f8bbba06c0c952d928fd779f650fee5c0c /tests/clock.test
parent990b376ae11fcf1fa64d1e2f5ccfc39a8052100d (diff)
parenta231dcf0ac4bdbdd550d70cc4955dfe048d0d21b (diff)
downloadtcl-c6fd11389a8714a5c44bbb3ce9d6ff0b8d49f7ae.zip
tcl-c6fd11389a8714a5c44bbb3ce9d6ff0b8d49f7ae.tar.gz
tcl-c6fd11389a8714a5c44bbb3ce9d6ff0b8d49f7ae.tar.bz2
Change "clock scan/format -format %x -locale current" output on msgcat locale change. Bug [4a0c163d24]
Diffstat (limited to 'tests/clock.test')
-rw-r--r--tests/clock.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 2abeab9..d4f0bc9 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -36931,11 +36931,37 @@ test clock-67.2 {Bug d19a30db57} -body {
# error, not segfault
tcl::clock::GetJulianDayFromEraYearMonthDay {} 2361222
} -returnCodes error -match glob -result *
+
test clock-67.3 {Bug d19a30db57} -body {
# error, not segfault
tcl::clock::GetJulianDayFromEraYearWeekDay {} 2361222
} -returnCodes error -match glob -result *
+test clock-67.4 {Change format %x output on global locale change [Bug 4a0c163d24]} -setup {
+ package require msgcat
+ set current [msgcat::mclocale]
+} -body {
+ msgcat::mclocale de_de
+ set res [list [clock format 1 -locale current -format %x]]
+ msgcat::mclocale en_uk
+ lappend res [clock format 1 -locale current -format %x]
+} -cleanup {
+ msgcat::mclocale $current
+} -result {01.01.1970 01/01/1970}
+
+test clock-67.5 {Change scan %x output on global locale change [Bug 4a0c163d24]} -setup {
+ package require msgcat
+ set current [msgcat::mclocale]
+} -body {
+ msgcat::mclocale de_de
+ set res [clock scan "01.01.1970" -locale current -format %x]
+ msgcat::mclocale en_uk
+ # This will fail without the bug fix, as still de_de is active
+ expr {$res == [clock scan "01/01/1970" -locale current -format %x]}
+} -cleanup {
+ msgcat::mclocale $current
+} -result {1}
+
# cleanup
namespace delete ::testClock