diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2001-09-28 15:32:17 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2001-09-28 15:32:17 (GMT) |
commit | 98bc47debac65f50b1b14eb7c32f6afe37bdf51a (patch) | |
tree | 24d4af32d308623f80fbcb56ee84f241ea3d63fa /tests | |
parent | cae247df825bf42c0dd22f43f2047a307d54eb65 (diff) | |
download | tcl-98bc47debac65f50b1b14eb7c32f6afe37bdf51a.zip tcl-98bc47debac65f50b1b14eb7c32f6afe37bdf51a.tar.gz tcl-98bc47debac65f50b1b14eb7c32f6afe37bdf51a.tar.bz2 |
Fixed Bug #465674 reported by me. [lsort -index end-1] now behaves sensibly...
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cmdIL.test | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/cmdIL.test b/tests/cmdIL.test index d6f68a3..694abbd 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.13 2000/09/17 22:40:41 ericm Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.14 2001/09/28 15:32:17 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -98,6 +98,12 @@ test cmdIL-1.25 {Tcl_LsortObjCmd procedure, order of -index and -command} { rename testcmp "" set result } [list 0 [list [list a b] [list c d]]] +# Note that the required order only exists in the end-1'th element; +# indexing using the end element or any fixed offset from the start +# will not work... +test cmdIL-1.26 {Tcl_LsortObjCmd procedure, offset indexing from end} { + lsort -index end-1 {{a 1 e i} {b 2 3 f g} {c 4 5 6 d h}} +} {{c 4 5 6 d h} {a 1 e i} {b 2 3 f g}} # Can't think of any good tests for the MergeSort and MergeLists # procedures, except a bunch of random lists to sort. |