summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-09-08 13:01:31 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-09-08 13:01:31 (GMT)
commitfa105712c19ab4f84d85f6e33cb51a85e2ad259f (patch)
treea7a9bb771e8cb47db9ba5834f8790aa617861bf5 /tests/clock.test
parentd2c080833061d96d6d76d4d3873e15796cdd815c (diff)
parent600412a708fa193015ef5e22f66d6d4ceee741cc (diff)
downloadtcl-fa105712c19ab4f84d85f6e33cb51a85e2ad259f.zip
tcl-fa105712c19ab4f84d85f6e33cb51a85e2ad259f.tar.gz
tcl-fa105712c19ab4f84d85f6e33cb51a85e2ad259f.tar.bz2
merge 8.6.5
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..615f3a8 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 [regexp {^\d{2}\.\d{2}\.\d{4}$} [clock format 1 -locale current -format %x]]
+ msgcat::mclocale en_uk
+ lappend res [regexp {^\d{2}/\d{2}/\d{4}$} [clock format 1 -locale current -format %x]]
+} -cleanup {
+ msgcat::mclocale $current
+} -result {1 1}
+
+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