diff options
author | ericm <ericm@noemail.net> | 2000-02-09 03:56:23 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-02-09 03:56:23 (GMT) |
commit | 2e70e125bbcf620af205e2c3a35955af22816a9e (patch) | |
tree | a7b9b351fe19397eeb8cff8c4b5d7693ddbd459d /tests/clock.test | |
parent | 99fe292e8d4577e1c8880c1a0369ea57bd839121 (diff) | |
download | tcl-2e70e125bbcf620af205e2c3a35955af22816a9e.zip tcl-2e70e125bbcf620af205e2c3a35955af22816a9e.tar.gz tcl-2e70e125bbcf620af205e2c3a35955af22816a9e.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).
FossilOrigin-Name: 21f3edaefcbe19141cead64c26aeb662248fd1dd
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 - - - - - - - - - - - |