diff options
author | sebres <sebres@users.sourceforge.net> | 2017-01-10 22:04:49 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-01-10 22:04:49 (GMT) |
commit | c093e76184fc3101487abf86878fcc8e85a77cd9 (patch) | |
tree | 99b2b744d045a8c1c5eae50360e41ee74b987d2a /tests | |
parent | f70ebac8b8c9c01999150364b4155b0d50911cbc (diff) | |
download | tcl-c093e76184fc3101487abf86878fcc8e85a77cd9.zip tcl-c093e76184fc3101487abf86878fcc8e85a77cd9.tar.gz tcl-c093e76184fc3101487abf86878fcc8e85a77cd9.tar.bz2 |
[temp-commit]: ClockFreeScan back-ported (cherry picked), all tests case passed + several new test-cases for bug fixing implemented here;
environment epoch ported, several fixes for the time zone / tzdata caching ported;
mem-leak fix + memory leak test cases passed
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clock.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/clock.test b/tests/clock.test index ecc6f5f..477f142 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -35803,6 +35803,27 @@ test clock-34.40 {clock scan, next day of week} { clock format [clock scan "next thursday" -base [clock scan 20000112]] \ -format {%b %d, %Y} } "Jan 20, 2000" +test clock-34.40.1 {clock scan, ordinal month after relative date} { + # This will fail without the bug fix (clock.tcl), as still missing + # month/julian day conversion before ordinal month increment + clock format [ \ + clock scan "5 years 18 months 387 days" -base 0 -gmt 1 + ] -format {%a, %b %d, %Y} -gmt 1 -locale en_US_roman +} "Sat, Jul 23, 1977" +test clock-34.40.2 {clock scan, ordinal month after relative date} { + # This will fail without the bug fix (clock.tcl), as still missing + # month/julian day conversion before ordinal month increment + clock format [ \ + clock scan "5 years 18 months 387 days next Jan" -base 0 -gmt 1 + ] -format {%a, %b %d, %Y} -gmt 1 -locale en_US_roman +} "Mon, Jan 23, 1978" +test clock-34.40.3 {clock scan, day of week after ordinal date} { + # This will fail without the bug fix (clock.tcl), because the relative + # week day should be applied after whole date conversion + clock format [ \ + clock scan "5 years 18 months 387 days next January Fri" -base 0 -gmt 1 + ] -format {%a, %b %d, %Y} -gmt 1 -locale en_US_roman +} "Fri, Jan 27, 1978" # weekday specification and base. test clock-34.41 {2nd monday in november} { |