diff options
author | ericm <ericm> | 2000-02-09 03:56:24 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-02-09 03:56:24 (GMT) |
commit | 43f67ff23bc430cc34e5a88c5be8c4ac5ca9dbc8 (patch) | |
tree | a7b9b351fe19397eeb8cff8c4b5d7693ddbd459d /tests/clock.test | |
parent | 67763d47ff042080e9e4784101f27258c6148379 (diff) | |
download | tcl-43f67ff23bc430cc34e5a88c5be8c4ac5ca9dbc8.zip tcl-43f67ff23bc430cc34e5a88c5be8c4ac5ca9dbc8.tar.gz tcl-43f67ff23bc430cc34e5a88c5be8c4ac5ca9dbc8.tar.bz2 |
* tests/clock.test: Added tests for "next monthname" constructs.
* generic/tclDate.c:
* generic/tclGetDate.y (Message): Added a grammar rule for "next
monthname" so that we can handle "next january" and similar
constructs (bug #4146).
Diffstat (limited to 'tests/clock.test')
-rw-r--r-- | tests/clock.test | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/clock.test b/tests/clock.test index 74a32b4..e7c65b0 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.9 2000/01/14 22:15:51 ericm Exp $ +# RCS: @(#) $Id: clock.test,v 1.10 2000/02/09 03:56:24 ericm Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -393,18 +393,20 @@ test clock-6.11 {clock roll over dates} { clock format $time -format %j -gmt true } {060} +test clock-7.1 {clock scan next monthname} { + clock format [clock scan "next june" -base [clock scan "june 1, 2000"]] \ + -format %m.%Y +} "06.2001" +test clock-7.2 {clock scan next monthname} { + clock format [clock scan "next july" -base [clock scan "june 1, 2000"]] \ + -format %m.%Y +} "07.2000" +test clock-7.3 {clock scan next monthname} { + clock format [clock scan "next may" -base [clock scan "june 1, 2000"]] \ + -format %m.%Y +} "05.2001" + # cleanup ::tcltest::cleanupTests return - - - - - - - - - - - |