diff options
author | gahr <gahr@gahr.ch> | 2016-02-23 16:31:18 (GMT) |
---|---|---|
committer | gahr <gahr@gahr.ch> | 2016-02-23 16:31:18 (GMT) |
commit | 35844385d63395c887098709940734d55556397a (patch) | |
tree | d1d7688693a4d47297d51538354f9ea9b606dad6 /tests | |
parent | d6eeb008f739a45e62dc3719510a389454bf464b (diff) | |
download | tcl-35844385d63395c887098709940734d55556397a.zip tcl-35844385d63395c887098709940734d55556397a.tar.gz tcl-35844385d63395c887098709940734d55556397a.tar.bz2 |
Make sure that adding 0 weekdays doesn't result in going back in time
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clock.test | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/clock.test b/tests/clock.test index fc7992d..0b26213 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -35237,7 +35237,12 @@ test clock-30.28 {clock add weekdays starting on Sunday} { set f1 [clock add $t 1 weekday] set x1 [clock format $f1 -format {%Y-%m-%d}] } {2013-11-25} -test clock-30.29 {clock add weekdays systematic} -body { +test clock-30.29 {clock add 0 weekdays starting on a weekend} { + set t [clock scan {2016-02-27}] ;# Saturday + set f1 [clock add $t 0 weekdays] + set x1 [clock format $f1 -format {%Y-%m-%d}] +} {2016-02-27} +test clock-30.30 {clock add weekdays systematic} -body { set n [clock seconds] set d [clock format $n -format %u] for {set i 1} {$i < 100} {incr i} { |