diff options
author | sebres <sebres@users.sourceforge.net> | 2024-07-28 19:47:02 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2024-07-28 19:47:02 (GMT) |
commit | b77c4cdc7ae8569f1839774dd494054c2a6cdaba (patch) | |
tree | f92a528ec53ccc5906f6d98de27788365d801586 /tests | |
parent | 8791e7f36429f080a58c126f24c2107c4e587d85 (diff) | |
parent | a97bdb56bc3a8c3cecf37a302edb0684e36fe0ab (diff) | |
download | tcl-b77c4cdc7ae8569f1839774dd494054c2a6cdaba.zip tcl-b77c4cdc7ae8569f1839774dd494054c2a6cdaba.tar.gz tcl-b77c4cdc7ae8569f1839774dd494054c2a6cdaba.tar.bz2 |
merge 8.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clock.test | 16 | ||||
-rw-r--r-- | tests/cmdAH.test | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/clock.test b/tests/clock.test index 5546231..1b70c04 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -283,7 +283,7 @@ test clock-0.1 "initial: auto-loading of ensemble and stubs on demand" -setup { clock seconds; # init ensemble (but not yet stubs, loading of clock.tcl retarded) lappend ret ens:[namespace ensemble exists ::clock] lappend ret stubs:[expr {[namespace which -command ::tcl::clock::GetSystemTimeZone] ne ""}] - clock format -now; # clock.tcl stubs expected + clock format now; # clock.tcl stubs expected lappend ret stubs:[expr {[namespace which -command ::tcl::clock::GetSystemTimeZone] ne ""}] } } -cleanup { @@ -298,7 +298,7 @@ test clock-0.1a "initial: safe interpreter shares clock command with parent" -se $sci eval { clock seconds }; # init ensemble (but not yet stubs, loading of clock.tcl retarded) lappend ret ens:[namespace ensemble exists ::clock] lappend ret stubs:[expr {[namespace which -command ::tcl::clock::GetSystemTimeZone] ne ""}] - $sci eval { clock format -now }; # clock.tcl stubs expected + $sci eval { clock format now }; # clock.tcl stubs expected lappend ret stubs:[expr {[namespace which -command ::tcl::clock::GetSystemTimeZone] ne ""}] } } -cleanup { @@ -314,14 +314,14 @@ test clock-0.2 "initial: loading of format/locale does not overwrite interp stat if {[catch { return -level 0 -code error -errorcode {EXPERR TEST-ERROR} -errorinfo "ERROR expected error" test }]} { - clock format -now -locale de; # should not overwrite error code/info + clock format now -locale de; # should not overwrite error code/info list $::errorCode $::errorInfo } } -result {{EXPERR TEST-ERROR} {ERROR expected error}} # Test some of the basics of [clock format] -set syntax "clockval|-now ?-format string? ?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?" +set syntax "clockval|now ?-format string? ?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?" test clock-1.0 "clock format - wrong # args" { list [catch {clock format} msg] $msg $::errorCode } [subst {1 {wrong # args: should be "clock format $syntax"} {CLOCK wrongNumArgs}}] @@ -332,7 +332,7 @@ test clock-1.0.1 "clock format - wrong # args (compiled ensemble with invalid sy test clock-1.1 "clock format - bad time" { list [catch {clock format foo} msg opt] $msg [dict getd $opt -errorcode {}] -} {1 {bad seconds "foo": must be -now or integer} {CLOCK badOption foo}} +} {1 {bad seconds "foo": must be now or integer} {CLOCK badOption foo}} test clock-1.2 "clock format - bad gmt val" { list [catch {clock format 0 -gmt foo} msg] $msg @@ -367,10 +367,10 @@ test clock-1.7.1 "clock format - command abbreviations (compat regression test)" clock f 0 -g 1 -f "%Y-%m-%d" } 1970-01-01 -test clock-1.8 "clock format -now" { +test clock-1.8 "clock format now" { # give one second more for test (if on boundary of the current second): set n [clock format [clock seconds] -g 1 -f "%s"] - expr {[clock format -now -g 1 -f "%s"] in [list $n [incr n]]} + expr {[clock format now -g 1 -f "%s"] in [list $n [incr n]]} } 1 test clock-1.9 "clock arguments: option doubly present" { @@ -18704,7 +18704,7 @@ test clock-6.8 {input of seconds} { test clock-6.8b "clock scan - bad base" { list [catch {clock scan "" -base foo -gmt 1} msg opt] $msg [dict getd $opt -errorcode {}] -} {1 {bad seconds "foo": must be -now or integer} {CLOCK badOption foo}} +} {1 {bad seconds "foo": must be now or integer} {CLOCK badOption foo}} test clock-6.9 {input of seconds - overflow} { list [catch {clock scan -9223372036854775809 -format %s -gmt true} result opt] $result [dict getd $opt -errorcode ""] diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 771e881..2b70484 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -32,7 +32,7 @@ testConstraint filetime64bit [expr { # check whether disk may have 2038 problem, see [fd91b0ca09cb171f]: set fn [makeFile "" foo.text] if {[catch { - exec sh -c "TZ=:UTC LC_TYME=en_US touch -ma -t '207006290000' '$fn' && TZ=:UTC LC_TYME=en_US ls -l '$fn'" + exec sh -c "TZ=:UTC LC_TIME=en_US touch -ma -t '207006290000' '$fn' && TZ=:UTC LC_TIME=en_US ls -l '$fn'" } res]} { #puts "Check constraint failed:\t$res" set res {} |