summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-18 09:26:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-18 09:26:46 (GMT)
commit3734b92b956e72d5e585e98d17e33fdce98e699d (patch)
treeb348713f636756e6a97ad252df592c33492a0e9a /tests/clock.test
parent2bde4e6f184c4cf0666efdc866bb78f33315b9b0 (diff)
downloadtcl-3734b92b956e72d5e585e98d17e33fdce98e699d.zip
tcl-3734b92b956e72d5e585e98d17e33fdce98e699d.tar.gz
tcl-3734b92b956e72d5e585e98d17e33fdce98e699d.tar.bz2
Make "clock configure" an internal command "::tcl::clock::configure"
Diffstat (limited to 'tests/clock.test')
-rw-r--r--tests/clock.test28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 2a3557c..5436051 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -34,7 +34,7 @@ testConstraint y2038 \
# Test with both validity modes - validate on / off:
-set valid_mode [clock configure -valid]
+set valid_mode [::tcl::clock::configure -valid]
# Wrapper to show validity mode in the test-case name (for possible errors):
proc test {args} {
@@ -44,7 +44,7 @@ proc test {args} {
}
puts [outputChannel] " Validity default mode: [expr {$valid_mode ? "on": "off"}]"
-testConstraint valid_off [expr {![clock configure -valid]}]
+testConstraint valid_off [expr {![::tcl::clock::configure -valid]}]
if {[namespace which -command ::tcl::unsupported::timerate] ne ""} {
namespace import ::tcl::unsupported::timerate
@@ -37141,13 +37141,13 @@ test clock-46.16$idx {freescan: validation rules: invalid day of week} \
_invalid_test "Sat Jan 02 00:00:00 1970$relstr" "Thu Jan 04 00:00:00 1970$relstr"
} -result [lrepeat 10 1 {unable to convert input string: invalid day of week}]
test clock-46.17$idx {scan: validation rules: invalid year} -setup {
- set orgcfg [list -min-year [clock configure -min-year] -max-year [clock configure -max-year] \
- -year-century [clock configure -year-century] -century-switch [clock configure -century-switch]]
- clock configure -min-year 2000 -max-year 2100 -year-century 2000 -century-switch 38
+ set orgcfg [list -min-year [::tcl::clock::configure -min-year] -max-year [::tcl::clock::configure -max-year] \
+ -year-century [::tcl::clock::configure -year-century] -century-switch [::tcl::clock::configure -century-switch]]
+ ::tcl::clock::configure -min-year 2000 -max-year 2100 -year-century 2000 -century-switch 38
} -body {
_invalid_test "70-01-01$relstr" "1870-01-01$relstr" "9570-01-01$relstr"
} -result [lrepeat 15 1 {unable to convert input string: invalid year}] -cleanup {
- clock configure {*}$orgcfg
+ ::tcl::clock::configure {*}$orgcfg
unset -nocomplain orgcfg
}
@@ -37285,23 +37285,23 @@ test clock-46.29-2 {scan: validation rules: valid day of leap/not leap year} \
[clock format [clock scan "365-2017" -format "%j-%G" -valid 1 -gmt 1] -format "%d-%m-%Y"]
} -result {31-12-2016 31-12-2017 31-12-2016 31-12-2017}
test clock-46.30 {scan: validation rules: invalid year} -setup {
- set orgcfg [list -min-year [clock configure -min-year] -max-year [clock configure -max-year] \
- -year-century [clock configure -year-century] -century-switch [clock configure -century-switch]]
- clock configure -min-year 2000 -max-year 2100 -year-century 2000 -century-switch 38
+ set orgcfg [list -min-year [::tcl::clock::configure -min-year] -max-year [::tcl::clock::configure -max-year] \
+ -year-century [::tcl::clock::configure -year-century] -century-switch [::tcl::clock::configure -century-switch]]
+ ::tcl::clock::configure -min-year 2000 -max-year 2100 -year-century 2000 -century-switch 38
} -body {
_invalid_test "01-01-70" "%d-%m-%y" "01-01-1870" "%d-%m-%C%y" "01-01-1970" "%d-%m-%Y"
} -result [lrepeat 15 1 {unable to convert input string: invalid year}] -cleanup {
- clock configure {*}$orgcfg
+ ::tcl::clock::configure {*}$orgcfg
unset -nocomplain orgcfg
}
test clock-46.31 {scan: validation rules: invalid iso year} -setup {
- set orgcfg [list -min-year [clock configure -min-year] -max-year [clock configure -max-year] \
- -year-century [clock configure -year-century] -century-switch [clock configure -century-switch]]
- clock configure -min-year 2000 -max-year 2100 -year-century 2000 -century-switch 38
+ set orgcfg [list -min-year [::tcl::clock::configure -min-year] -max-year [::tcl::clock::configure -max-year] \
+ -year-century [::tcl::clock::configure -year-century] -century-switch [::tcl::clock::configure -century-switch]]
+ ::tcl::clock::configure -min-year 2000 -max-year 2100 -year-century 2000 -century-switch 38
} -body {
_invalid_test "01-01-70" "%d-%m-%g" "01-01-9870" "%d-%m-%C%g" "01-01-9870" "%d-%m-%G"
} -result [lrepeat 15 1 {unable to convert input string: invalid iso year}] -cleanup {
- clock configure {*}$orgcfg
+ ::tcl::clock::configure {*}$orgcfg
unset -nocomplain orgcfg
}
rename _invalid_test {}