summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2000-08-07 21:30:34 (GMT)
committerhobbs <hobbs@noemail.net>2000-08-07 21:30:34 (GMT)
commit3f3597757f78bc2cf1ea865cff0e61557b154018 (patch)
tree0f2511dda5ab0da49d554e3496858ef52fa8d784 /tests
parent788e79bc795368eabfe6c223e05379cdfd71d819 (diff)
downloadtcl-3f3597757f78bc2cf1ea865cff0e61557b154018.zip
tcl-3f3597757f78bc2cf1ea865cff0e61557b154018.tar.gz
tcl-3f3597757f78bc2cf1ea865cff0e61557b154018.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: 8d1fb174813804110137ee6698a8807a5fb14dac
Diffstat (limited to 'tests')
-rw-r--r--tests/clock.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 926ac1c..2b9803c 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.13.2.1 2000/08/07 21:30:35 hobbs 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} {