summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-12-05 13:42:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-12-05 13:42:07 (GMT)
commitaaa7b42489be7695c3d8bf9f541a012c5b498b55 (patch)
treeebb78b76786de374fb7dada3ece1aedc49e9b3b4 /tests
parentaeed90eee383e8502f8b85b78a1b6f0758d003c4 (diff)
downloadtcl-aaa7b42489be7695c3d8bf9f541a012c5b498b55.zip
tcl-aaa7b42489be7695c3d8bf9f541a012c5b498b55.tar.gz
tcl-aaa7b42489be7695c3d8bf9f541a012c5b498b55.tar.bz2
Prevent shimmering crash in [lsearch] when -exact and -integer/-real are mixed.
[Bug 1844789]
Diffstat (limited to 'tests')
-rw-r--r--tests/lsearch.test11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/lsearch.test b/tests/lsearch.test
index fcaa85b..fed6bbd 100644
--- a/tests/lsearch.test
+++ b/tests/lsearch.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: lsearch.test,v 1.18 2005/12/09 14:13:01 dkf Exp $
+# RCS: @(#) $Id: lsearch.test,v 1.19 2007/12/05 13:42:09 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -463,6 +463,15 @@ test lsearch-20.3 {lsearch -index option, malformed index} {
list [catch {lsearch -index \{ {{a c} {a b} {a a}} a} msg] $msg
} {1 {unmatched open brace in list}}
+test lsearch-21.1 {lsearch shimmering crash} {
+ set x 0
+ lsearch -exact -integer $x $x
+} 0
+test lsearch-21.2 {lsearch shimmering crash} {
+ set x 0.5
+ lsearch -exact -real $x $x
+} 0
+
# cleanup
catch {unset res}
catch {unset increasingIntegers}