Skip to content

Commit 56d49be

Browse files
committed
clock-59.2: fix test for earlier tcl-version (free-scan handles only offset-TZ like +0200 correctly, and it'd be released with 8.6.16+)
1 parent e0722a7 commit 56d49be

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/clock.test

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38213,10 +38213,13 @@ test clock-59.2 {correct time zone names, format and scan back, bug and regressi
3821338213
} {
3821438214
set v [clock format $base -timezone Etc/GMT-2 -format "%Y-%m-%d %H:%M:%S %Z"]
3821538215
lappend result [expr {[set t [clock scan $v -format "%Y-%m-%d %H:%M:%S %Z"]] == $base ? 1 : "0 ($t != $base for $v)"}]
38216-
lappend result [expr {[set t [clock scan $v]] == $base ? 1 : "0 ($t != $base for $v)"}]
38216+
# free-scan only for 8.6.16+ (tzdata called +0200 instead of +02 for Etc/GMT-2) to avoid confusion:
38217+
if {[package vsatisfies [package provide Tcl] 8.6.16]} {
38218+
lappend result [expr {[set t [clock scan $v]] == $base ? 1 : "0 ($t != $base for $v)"}]
38219+
}
3821738220
}
3821838221
set result
38219-
} [lrepeat 12 1]
38222+
} [if {[package vsatisfies [package provide Tcl] 8.6.16]} {lrepeat 12 1} else {lrepeat 6 1}]
3822038223

3822138224
# case-insensitive matching of weekday and month names [Bug 1781282]
3822238225

0 commit comments

Comments
 (0)