diff options
author | ericm <ericm@noemail.net> | 2000-05-18 22:29:54 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-05-18 22:29:54 (GMT) |
commit | b12e22f2da8387d921f34fccf9894413bf4971c1 (patch) | |
tree | 09f7bd8bceecf28f329ecac1c3595ad42b49d34c /tests/clock.test | |
parent | e844815220271c59fbbca3de4c566bb63df79c08 (diff) | |
download | tcl-b12e22f2da8387d921f34fccf9894413bf4971c1.zip tcl-b12e22f2da8387d921f34fccf9894413bf4971c1.tar.gz tcl-b12e22f2da8387d921f34fccf9894413bf4971c1.tar.bz2 |
* tests/clock.test: Added test for "2 days 2 hours ago" style
specifications.
* generic/tclDate.c: Regenerated from tclGetDate.y.
* generic/tclGetDate.y: Tweaked grammar to properly handle the
"ago" keyword when it follows multiple relative unit specifiers,
as in "2 days 2 hours ago". [Bug: 5497].
FossilOrigin-Name: 5dc84a282db38c053d933f92b1fb49bcdd821ab6
Diffstat (limited to 'tests/clock.test')
-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 926ac1c..a0a4d6b 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.13 2000/04/10 17:18:57 ericm Exp $ +# RCS: @(#) $Id: clock.test,v 1.14 2000/05/18 22:29:56 ericm Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -337,6 +337,11 @@ test clock-4.40 {last monday in november} knownBug { } set res } {1991-11-25 1992-11-30 1993-11-29 1994-11-28 1995-11-27 1996-11-25} +test clock-4.41 {ago with multiple relative units} { + set base [clock scan "12/31/1999 00:00:00"] + set res [clock scan "2 days 2 hours ago" -base $base] + expr {$base - $res} +} 180000 # clock seconds test clock-5.1 {clock seconds tests} { |