diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-12-22 19:49:29 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-12-22 19:49:29 (GMT) |
commit | b67c18e73290a59c388687dd6df4015f135ba2c4 (patch) | |
tree | 807b4f0c17bee9346fd575add70440533142709f /tests/cmdIL.test | |
parent | f7e02c57c848c495a77975b927a0f4076bf4822c (diff) | |
download | tcl-b67c18e73290a59c388687dd6df4015f135ba2c4.zip tcl-b67c18e73290a59c388687dd6df4015f135ba2c4.tar.gz tcl-b67c18e73290a59c388687dd6df4015f135ba2c4.tar.bz2 |
[Bug 2918962]: Stop crash when -index and -stride are used together in [lsort].
Diffstat (limited to 'tests/cmdIL.test')
-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 17b0d9e..ca81ea5 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.42 2008/09/29 13:33:17 dkf Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.43 2009/12/22 19:49:29 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -140,6 +140,12 @@ test cmdIL-1.34 {lsort -stride errors} -returnCodes error -body { test cmdIL-1.35 {lsort -stride errors} -returnCodes error -body { lsort -stride 2 -index 3 {a b c d} } -result {when used with "-stride", the leading "-index" value must be within the group} +test cmdIL-1.36 {lsort -stride and -index: Bug 2918962} { + lsort -stride 2 -index {0 1} { + {{c o d e} 54321} {{b l a h} 94729} + {{b i g} 12345} {{d e m o} 34512} + } +} {{{b i g} 12345} {{d e m o} 34512} {{c o d e} 54321} {{b l a h} 94729}} # Can't think of any good tests for the MergeSort and MergeLists procedures, # except a bunch of random lists to sort. |