summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorericm <ericm>2000-01-13 20:33:09 (GMT)
committerericm <ericm>2000-01-13 20:33:09 (GMT)
commit2df683089994bc1bbc39f633ddbfa92a57b0024f (patch)
tree2ab75593da54c94ef8f64f640eb3be3aa97d00aa /tests
parentdee657ae620fbab5edb1f2fd5a11452a61b605ba (diff)
downloadtcl-2df683089994bc1bbc39f633ddbfa92a57b0024f.zip
tcl-2df683089994bc1bbc39f633ddbfa92a57b0024f.tar.gz
tcl-2df683089994bc1bbc39f633ddbfa92a57b0024f.tar.bz2
* tests/cmdIL.test: Added tests for lsort -dictionary with
characters that occur between Z and a in ASCII. * generic/tclCmdIL.c: Modified DictionaryCompare function (used by lsort -dictionary) to do upper/lower case equivalency before doing character comparisons, instead of after. This fixes bug #1357, in which lsort -dictionary [list ` AA c CC] and lsort -dictionary [list AA c ` CC] gave different (and both wrong) results.
Diffstat (limited to 'tests')
-rw-r--r--tests/cmdIL.test20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/cmdIL.test b/tests/cmdIL.test
index 7e53974..34d44df 100644
--- a/tests/cmdIL.test
+++ b/tests/cmdIL.test
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: cmdIL.test,v 1.10 1999/12/21 23:58:22 hobbs Exp $
+# RCS: @(#) $Id: cmdIL.test,v 1.11 2000/01/13 20:33:10 ericm Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -315,6 +315,24 @@ test cmdIL-4.27 {DictionaryCompare procedure, signed characters} {
}
set viewlist
} [list "abc" "abc\\200"]
+test cmdIL-4.28 {DictionaryCompare procedure, chars between Z and a in ASCII} {
+ lsort -dictionary [list AA ` c CC]
+} [list ` AA c CC]
+test cmdIL-4.29 {DictionaryCompare procedure, chars between Z and a in ASCII} {
+ lsort -dictionary [list AA ` c ^ \\ CC \[ \]]
+} [list \[ \\ \] ^ ` AA c CC]
+test cmdIL-4.30 {DictionaryCompare procedure, chars between Z and a in ASCII} {
+ lsort -dictionary [list AA ` c ^ _ \\ CC \[ dude \] funky]
+} [list \[ \\ \] ^ _ ` AA c CC dude funky]
+test cmdIL-4.31 {DictionaryCompare procedure, chars between Z and a in ASCII} {
+ lsort -dictionary [list AA c ` CC]
+} [list ` AA c CC]
+test cmdIL-4.32 {DictionaryCompare procedure, chars between Z and a in ASCII} {
+ lsort -dictionary [list AA c CC `]
+} [list ` AA c CC]
+test cmdIL-4.33 {DictionaryCompare procedure, chars between Z and a in ASCII} {
+ lsort -dictionary [list AA ! c CC `]
+} [list ! ` AA c CC]
# cleanup
::tcltest::cleanupTests