summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-01-10 22:38:56 (GMT)
committersebres <sebres@users.sourceforge.net>2017-01-10 22:38:56 (GMT)
commit9487f2cdcd7045ccc7f540099755acc0d2b36244 (patch)
tree4c5454ef6d689584f27bacbb860cdb9390f5c722 /tests
parentfb0ed853e7c49ff24e17f4cb633876d0780b64b5 (diff)
downloadtcl-9487f2cdcd7045ccc7f540099755acc0d2b36244.zip
tcl-9487f2cdcd7045ccc7f540099755acc0d2b36244.tar.gz
tcl-9487f2cdcd7045ccc7f540099755acc0d2b36244.tar.bz2
locale months scan switched to from list seek to index tree; bug fixing
Diffstat (limited to 'tests')
-rw-r--r--tests/clock.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/clock.test b/tests/clock.test
index e96dec6..1d02f39 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -18564,6 +18564,30 @@ test clock-6.11 {input of seconds - two values} {
clock scan {1 2} -format {%s %s} -gmt true
} 2
+test clock-6.12 {input of unambiguous short locale token (%b)} {
+ list [clock scan "12 Ja 2001" -format "%d %b %Y" -locale en_US_roman -gmt 1] \
+ [clock scan "12 Au 2001" -format "%d %b %Y" -locale en_US_roman -gmt 1]
+} {979257600 997574400}
+test clock-6.13 {input of lowercase locale token (%b)} {
+ list [clock scan "12 ja 2001" -format "%d %b %Y" -locale en_US_roman -gmt 1] \
+ [clock scan "12 au 2001" -format "%d %b %Y" -locale en_US_roman -gmt 1]
+} {979257600 997574400}
+test clock-6.14 {input of uppercase locale token (%b)} {
+ list [clock scan "12 JA 2001" -format "%d %b %Y" -locale en_US_roman -gmt 1] \
+ [clock scan "12 AU 2001" -format "%d %b %Y" -locale en_US_roman -gmt 1]
+} {979257600 997574400}
+test clock-6.15 {input of ambiguous short locale token (%b)} {
+ list [catch {
+ clock scan "12 J 2001" -format "%d %b %Y" -locale en_US_roman -gmt 1
+ } result] $result $errorCode
+} {1 {input string does not match supplied format} {CLOCK badInputString}}
+test clock-6.16 {input of ambiguous short locale token (%b)} {
+ list [catch {
+ clock scan "12 Ju 2001" -format "%d %b %Y" -locale en_US_roman -gmt 1
+ } result] $result $errorCode
+} {1 {input string does not match supplied format} {CLOCK badInputString}}
+
+
test clock-7.1 {Julian Day} {
clock scan 0 -format %J -gmt true
} -210866803200