@@ -283,7 +283,7 @@ test clock-0.1 "initial: auto-loading of ensemble and stubs on demand" -setup {
283
283
clock seconds; # init ensemble (but not yet stubs, loading of clock.tcl retarded)
284
284
lappend ret ens:[namespace ensemble exists ::clock]
285
285
lappend ret stubs:[expr {[namespace which -command ::tcl::clock::GetSystemTimeZone] ne ""}]
286
- clock format - now; # clock.tcl stubs expected
286
+ clock format now; # clock.tcl stubs expected
287
287
lappend ret stubs:[expr {[namespace which -command ::tcl::clock::GetSystemTimeZone] ne ""}]
288
288
}
289
289
} -cleanup {
@@ -298,7 +298,7 @@ test clock-0.1a "initial: safe interpreter shares clock command with parent" -se
298
298
$sci eval { clock seconds }; # init ensemble (but not yet stubs, loading of clock.tcl retarded)
299
299
lappend ret ens:[namespace ensemble exists ::clock]
300
300
lappend ret stubs:[expr {[namespace which -command ::tcl::clock::GetSystemTimeZone] ne ""}]
301
- $sci eval { clock format - now }; # clock.tcl stubs expected
301
+ $sci eval { clock format now }; # clock.tcl stubs expected
302
302
lappend ret stubs:[expr {[namespace which -command ::tcl::clock::GetSystemTimeZone] ne ""}]
303
303
}
304
304
} -cleanup {
@@ -314,14 +314,14 @@ test clock-0.2 "initial: loading of format/locale does not overwrite interp stat
314
314
if {[catch {
315
315
return -level 0 -code error -errorcode {EXPERR TEST-ERROR} -errorinfo "ERROR expected error" test
316
316
}]} {
317
- clock format - now -locale de; # should not overwrite error code/info
317
+ clock format now -locale de; # should not overwrite error code/info
318
318
list $::errorCode $::errorInfo
319
319
}
320
320
} -result {{EXPERR TEST-ERROR} {ERROR expected error}}
321
321
322
322
# Test some of the basics of [clock format]
323
323
324
- set syntax "clockval|- now ?-format string? ?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?"
324
+ set syntax "clockval|now ?-format string? ?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?"
325
325
test clock-1.0 "clock format - wrong # args" {
326
326
list [catch {clock format} msg] $msg $::errorCode
327
327
} [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
332
332
333
333
test clock-1.1 "clock format - bad time" {
334
334
list [catch {clock format foo} msg opt] $msg [dict getd $opt -errorcode {}]
335
- } {1 {bad seconds "foo": must be - now or integer} {CLOCK badOption foo}}
335
+ } {1 {bad seconds "foo": must be now or integer} {CLOCK badOption foo}}
336
336
337
337
test clock-1.2 "clock format - bad gmt val" {
338
338
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)"
367
367
clock f 0 -g 1 -f "%Y-%m-%d"
368
368
} 1970-01-01
369
369
370
- test clock-1.8 "clock format - now" {
370
+ test clock-1.8 "clock format now" {
371
371
# give one second more for test (if on boundary of the current second):
372
372
set n [clock format [clock seconds] -g 1 -f "%s"]
373
- expr {[clock format - now -g 1 -f "%s"] in [list $n [incr n]]}
373
+ expr {[clock format now -g 1 -f "%s"] in [list $n [incr n]]}
374
374
} 1
375
375
376
376
test clock-1.9 "clock arguments: option doubly present" {
@@ -18704,7 +18704,7 @@ test clock-6.8 {input of seconds} {
18704
18704
18705
18705
test clock-6.8b "clock scan - bad base" {
18706
18706
list [catch {clock scan "" -base foo -gmt 1} msg opt] $msg [dict getd $opt -errorcode {}]
18707
- } {1 {bad seconds "foo": must be - now or integer} {CLOCK badOption foo}}
18707
+ } {1 {bad seconds "foo": must be now or integer} {CLOCK badOption foo}}
18708
18708
18709
18709
test clock-6.9 {input of seconds - overflow} {
18710
18710
list [catch {clock scan -9223372036854775809 -format %s -gmt true} result opt] $result [dict getd $opt -errorcode ""]
0 commit comments