From fbdf93c7ad4ff51cee956313a0f90ab40eebfbed Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 14 Oct 2003 21:49:25 +0000 Subject: Test to detect a sharing problem with TIP#127 exposed in tclbench Thanks DGP for helping develop this. --- tests/cmdIL.test | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- cgit v0.12