summaryrefslogtreecommitdiffstats
path: root/tests/lsearch.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-12-05 14:54:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-12-05 14:54:07 (GMT)
commit7579bff98894f7f03c12fae6ecbd01e473d06021 (patch)
tree71dc8c9a29b4aba101a64be04736efb7d8b49b67 /tests/lsearch.test
parent300ffcba6bfd94fe5e9afa67a61040c1974f39c3 (diff)
downloadtcl-7579bff98894f7f03c12fae6ecbd01e473d06021.zip
tcl-7579bff98894f7f03c12fae6ecbd01e473d06021.tar.gz
tcl-7579bff98894f7f03c12fae6ecbd01e473d06021.tar.bz2
Prevent shimmering crash in [lsearch] when -exact and -integer/-real are
mixed. [Bug 1844789]
Diffstat (limited to 'tests/lsearch.test')
-rw-r--r--tests/lsearch.test11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/lsearch.test b/tests/lsearch.test
index 86884c4..51d2176 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.10.2.3 2005/12/09 14:39:25 dkf Exp $
+# RCS: @(#) $Id: lsearch.test,v 1.10.2.4 2007/12/05 14:54:08 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -366,6 +366,15 @@ test lsearch-16.2 {lsearch -regexp allows internal backrefs} {
lsearch -regexp {a aa b} {(.)\1}
} 1
+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}