diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2003-10-14 21:49:25 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2003-10-14 21:49:25 (GMT) |
commit | fbdf93c7ad4ff51cee956313a0f90ab40eebfbed (patch) | |
tree | cf2962187b40925bc66e789c1415143c2e1659ce /tests/cmdIL.test | |
parent | 71d74c3491147feabe11cb5321e23ee79ddfd41d (diff) | |
download | tcl-fbdf93c7ad4ff51cee956313a0f90ab40eebfbed.zip tcl-fbdf93c7ad4ff51cee956313a0f90ab40eebfbed.tar.gz tcl-fbdf93c7ad4ff51cee956313a0f90ab40eebfbed.tar.bz2 |
Test to detect a sharing problem with TIP#127 exposed in tclbench
Thanks DGP for helping develop this.
Diffstat (limited to 'tests/cmdIL.test')
-rw-r--r-- | tests/cmdIL.test | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/cmdIL.test b/tests/cmdIL.test index 199fbd5..05f1755 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.16 2003/10/14 13:38:58 dkf Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.17 2003/10/14 21:49:25 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -386,6 +386,15 @@ test cmdIL-5.4 {lsort with list style index} { {dogs {0 1}} } } {{dogs {0 1}} {the {0 1 2} lazy} {jumps {30 31 2 33} over} {brown {0 1 2 3 4} fox} {the {0 1 2 3 4 5} quick}} +test cmdIL-5.5 {lsort with list style index and sharing} { + proc test {l} { + set n $l + foreach e $l {lappend n [list [expr {rand()}] $e]} + lindex [lsort -real -index $l $n] 1 1 + } + expr srand(1) + test 0 +} 0 # cleanup ::tcltest::cleanupTests |