Skip to content

Commit

Permalink
clock-59.2: fix test for earlier tcl-version (free-scan handles only …
Browse files Browse the repository at this point in the history
…offset-TZ like +0200 correctly, and it'd be released with 8.6.16+)
  • Loading branch information
sebres committed Oct 29, 2024
1 parent e0722a7 commit 56d49be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/clock.test
Original file line number Diff line number Diff line change
Expand Up @@ -38213,10 +38213,13 @@ test clock-59.2 {correct time zone names, format and scan back, bug and regressi
} {
set v [clock format $base -timezone Etc/GMT-2 -format "%Y-%m-%d %H:%M:%S %Z"]
lappend result [expr {[set t [clock scan $v -format "%Y-%m-%d %H:%M:%S %Z"]] == $base ? 1 : "0 ($t != $base for $v)"}]
lappend result [expr {[set t [clock scan $v]] == $base ? 1 : "0 ($t != $base for $v)"}]
# free-scan only for 8.6.16+ (tzdata called +0200 instead of +02 for Etc/GMT-2) to avoid confusion:
if {[package vsatisfies [package provide Tcl] 8.6.16]} {
lappend result [expr {[set t [clock scan $v]] == $base ? 1 : "0 ($t != $base for $v)"}]
}
}
set result
} [lrepeat 12 1]
} [if {[package vsatisfies [package provide Tcl] 8.6.16]} {lrepeat 12 1} else {lrepeat 6 1}]

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

Expand Down

0 comments on commit 56d49be

Please sign in to comment.