summaryrefslogtreecommitdiffstats
path: root/tests/cmdIL.test
diff options
context:
space:
mode:
authorrjohnson <rjohnson>1998-10-13 20:05:38 (GMT)
committerrjohnson <rjohnson>1998-10-13 20:05:38 (GMT)
commit34fd6003c9fe9da83ffe806108ebbd4bbffb796e (patch)
treebda58da65373a532cb5f7c35c63d67fd5c993e59 /tests/cmdIL.test
parent70f31cd5c93f7fc20debf6d0547326c3f40d2cc2 (diff)
downloadtcl-34fd6003c9fe9da83ffe806108ebbd4bbffb796e.zip
tcl-34fd6003c9fe9da83ffe806108ebbd4bbffb796e.tar.gz
tcl-34fd6003c9fe9da83ffe806108ebbd4bbffb796e.tar.bz2
Fixed bug in "lsort -dictionary" that caused problems when comparing
numbers that started with 0.
Diffstat (limited to 'tests/cmdIL.test')
-rw-r--r--tests/cmdIL.test25
1 files changed, 14 insertions, 11 deletions
diff --git a/tests/cmdIL.test b/tests/cmdIL.test
index 925570f..f01728b 100644
--- a/tests/cmdIL.test
+++ b/tests/cmdIL.test
@@ -7,7 +7,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.3 1998/09/14 18:40:08 stanton Exp $
+# RCS: @(#) $Id: cmdIL.test,v 1.4 1998/10/13 20:05:39 rjohnson Exp $
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -38,34 +38,37 @@ test cmdIL-1.7 {Tcl_LsortObjCmd procedure, -decreasing option} {
test cmdIL-1.8 {Tcl_LsortObjCmd procedure, -dictionary option} {
lsort -dictionary {d e c b a d35 d300}
} {a b c d d35 d300 e}
-test cmdIL-1.9 {Tcl_LsortObjCmd procedure, -increasing option} {
+test cmdIL-1.9 {Tcl_LsortObjCmd procedure, -dictionary option} {
+ lsort -dictionary {1k 0k 10k}
+} {0k 1k 10k}
+test cmdIL-1.10 {Tcl_LsortObjCmd procedure, -increasing option} {
lsort -decreasing -increasing {d e c b a d35 d300}
} {a b c d d300 d35 e}
-test cmdIL-1.10 {Tcl_LsortObjCmd procedure, -index option} {
+test cmdIL-1.11 {Tcl_LsortObjCmd procedure, -index option} {
list [catch {lsort -index {1 3 2 5}} msg] $msg
} {1 {"-index" option must be followed by list index}}
-test cmdIL-1.11 {Tcl_LsortObjCmd procedure, -index option} {
+test cmdIL-1.12 {Tcl_LsortObjCmd procedure, -index option} {
list [catch {lsort -index foo {1 3 2 5}} msg] $msg
} {1 {bad index "foo": must be integer or "end"}}
-test cmdIL-1.12 {Tcl_LsortObjCmd procedure, -index option} {
+test cmdIL-1.13 {Tcl_LsortObjCmd procedure, -index option} {
lsort -index end -integer {{2 25} {10 20 50 100} {3 16 42} 1}
} {1 {2 25} {3 16 42} {10 20 50 100}}
-test cmdIL-1.13 {Tcl_LsortObjCmd procedure, -index option} {
+test cmdIL-1.14 {Tcl_LsortObjCmd procedure, -index option} {
lsort -index 1 -integer {{1 25 100} {3 16 42} {10 20 50}}
} {{3 16 42} {10 20 50} {1 25 100}}
-test cmdIL-1.14 {Tcl_LsortObjCmd procedure, -integer option} {
+test cmdIL-1.15 {Tcl_LsortObjCmd procedure, -integer option} {
lsort -integer {24 6 300 18}
} {6 18 24 300}
-test cmdIL-1.15 {Tcl_LsortObjCmd procedure, -integer option} {
+test cmdIL-1.16 {Tcl_LsortObjCmd procedure, -integer option} {
list [catch {lsort -integer {1 3 2.4}} msg] $msg
} {1 {expected integer but got "2.4"}}
-test cmdIL-1.16 {Tcl_LsortObjCmd procedure, -real option} {
+test cmdIL-1.17 {Tcl_LsortObjCmd procedure, -real option} {
lsort -real {24.2 6e3 150e-1}
} {150e-1 24.2 6e3}
-test cmdIL-1.17 {Tcl_LsortObjCmd procedure, bogus list} {
+test cmdIL-1.18 {Tcl_LsortObjCmd procedure, bogus list} {
list [catch {lsort "1 2 3 \{ 4"} msg] $msg
} {1 {unmatched open brace in list}}
-test cmdIL-1.18 {Tcl_LsortObjCmd procedure, empty list} {
+test cmdIL-1.19 {Tcl_LsortObjCmd procedure, empty list} {
lsort {}
} {}