summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-07-16 16:24:02 (GMT)
committersebres <sebres@users.sourceforge.net>2024-07-16 16:24:02 (GMT)
commit01d879a8f4238ac0b1c4d82c5490ab4ae51ad400 (patch)
tree31d1f04f6d1be4729c5bffcc83b0f4722536efbf
parent538e291abb0a2931a8ce5c1c37695f9f39cfd14f (diff)
downloadtcl-01d879a8f4238ac0b1c4d82c5490ab4ae51ad400.zip
tcl-01d879a8f4238ac0b1c4d82c5490ab4ae51ad400.tar.gz
tcl-01d879a8f4238ac0b1c4d82c5490ab4ae51ad400.tar.bz2
clock.test: more regression tests: clock-46.[56] cherry-picked from 8.7, clock-46.7 to illustrate regression [3ee8f1c2a785f4d8] (8.6 is not affected)
-rw-r--r--tests/clock.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/clock.test b/tests/clock.test
index b54d9f0..70d527e 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -36113,6 +36113,25 @@ test clock-46.4 {regression test - month thirteen} \
clock scan 20041301
} -result [clock scan 2005-01-01 -format %Y-%m-%d]
+test clock-46.5 {regression test - good time} \
+ -body {
+ # 12:01 apm are valid input strings...
+ list [clock scan "12:01 am" -base 0 -gmt 1] \
+ [clock scan "12:01 pm" -base 0 -gmt 1]
+ } -result {60 43260}
+test clock-46.6 {freescan: regression test - bad time} \
+ -body {
+ # 13:00 am/pm are invalid input strings...
+ list [clock scan "13:00 am" -base 0 -gmt 1] \
+ [clock scan "13:00 pm" -base 0 -gmt 1]
+ } -result {-1 -1}
+
+test clock-46.7 {regression test - switch day by large not-valid time, see bug [3ee8f1c2a785f4d8]} {
+ list [clock scan 23:59:59 -base 0 -gmt 1 -format %H:%M:%S] \
+ [clock scan 24:00:00 -base 0 -gmt 1 -format %H:%M:%S] \
+ [clock scan 48:00:00 -base 0 -gmt 1 -format %H:%M:%S]
+} {86399 86400 172800}
+
test clock-47.1 {regression test - four-digit time} {
clock scan 0012
} [clock scan 0012 -format %H%M]