summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2007-08-25 16:53:24 (GMT)
committerKevin B Kenny <kennykb@acm.org>2007-08-25 16:53:24 (GMT)
commite49284b70f26fd21f2b9751427b43b076965d60c (patch)
tree6c33a0dd669e487058840c3763b86973bf747b91 /tests
parent30befb3c49274ee4989a40ab39af49e2d2838891 (diff)
downloadtcl-e49284b70f26fd21f2b9751427b43b076965d60c.zip
tcl-e49284b70f26fd21f2b9751427b43b076965d60c.tar.gz
tcl-e49284b70f26fd21f2b9751427b43b076965d60c.tar.bz2
* library/clock.tcl (ParseClockScanFormat): Modified code to allow
* tests/clock.test (clock-60.*): case-insensitive matching of time zone and month names. [Bug 1781282]
Diffstat (limited to 'tests')
-rw-r--r--tests/clock.test41
1 files changed, 40 insertions, 1 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 801cb48..83d624a 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -11,7 +11,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.79 2007/04/20 05:51:11 kennykb Exp $
+# RCS: @(#) $Id: clock.test,v 1.80 2007/08/25 16:53:25 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -36549,6 +36549,45 @@ test clock-59.1 {military time zones} {
join $trouble \n
} {}
+# case-insensitive matching of weekday and month names [Bug 1781282]
+
+test clock-60.1 {case insensitive weekday names} {
+ clock scan "2000-W01 monday" -gmt true -format "%G-W%V %a"
+} [clock scan "2000-W01-1" -gmt true -format "%G-W%V-%u"]
+test clock-60.2 {case insensitive weekday names} {
+ clock scan "2000-W01 Monday" -gmt true -format "%G-W%V %a"
+} [clock scan "2000-W01-1" -gmt true -format "%G-W%V-%u"]
+test clock-60.3 {case insensitive weekday names} {
+ clock scan "2000-W01 MONDAY" -gmt true -format "%G-W%V %a"
+} [clock scan "2000-W01-1" -gmt true -format "%G-W%V-%u"]
+test clock-60.4 {case insensitive weekday names} {
+ clock scan "2000-W01 friday" -gmt true -format "%G-W%V %a"
+} [clock scan "2000-W01-5" -gmt true -format "%G-W%V-%u"]
+test clock-60.5 {case insensitive weekday names} {
+ clock scan "2000-W01 Friday" -gmt true -format "%G-W%V %a"
+} [clock scan "2000-W01-5" -gmt true -format "%G-W%V-%u"]
+test clock-60.6 {case insensitive weekday names} {
+ clock scan "2000-W01 FRIDAY" -gmt true -format "%G-W%V %a"
+} [clock scan "2000-W01-5" -gmt true -format "%G-W%V-%u"]
+test clock-60.7 {case insensitive month names} {
+ clock scan "1 january 2000" -gmt true -format "%d %b %Y"
+} [clock scan "2000-01-01" -gmt true -format "%Y-%m-%d"]
+test clock-60.8 {case insensitive month names} {
+ clock scan "1 January 2000" -gmt true -format "%d %b %Y"
+} [clock scan "2000-01-01" -gmt true -format "%Y-%m-%d"]
+test clock-60.9 {case insensitive month names} {
+ clock scan "1 JANUARY 2000" -gmt true -format "%d %b %Y"
+} [clock scan "2000-01-01" -gmt true -format "%Y-%m-%d"]
+test clock-60.10 {case insensitive month names} {
+ clock scan "1 december 2000" -gmt true -format "%d %b %Y"
+} [clock scan "2000-12-01" -gmt true -format "%Y-%m-%d"]
+test clock-60.11 {case insensitive month names} {
+ clock scan "1 December 2000" -gmt true -format "%d %b %Y"
+} [clock scan "2000-12-01" -gmt true -format "%Y-%m-%d"]
+test clock-60.12 {case insensitive month names} {
+ clock scan "1 DECEMBER 2000" -gmt true -format "%d %b %Y"
+} [clock scan "2000-12-01" -gmt true -format "%Y-%m-%d"]
+
# cleanup
namespace delete ::testClock