summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2001-05-14 08:57:26 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2001-05-14 08:57:26 (GMT)
commit4b44b131e1861cfca2b4de299e4b64218efefa10 (patch)
tree1146b72baa96e51760dd2a93cdd4a6c09b080be0 /tests
parentd26e64c0ba3b4f316034112f270a073472543cae (diff)
downloadtcl-4b44b131e1861cfca2b4de299e4b64218efefa10.zip
tcl-4b44b131e1861cfca2b4de299e4b64218efefa10.tar.gz
tcl-4b44b131e1861cfca2b4de299e4b64218efefa10.tar.bz2
Negative start index to [string first] caused offset return value (Bug 423581)
Diffstat (limited to 'tests')
-rw-r--r--tests/string.test5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/string.test b/tests/string.test
index aad463e..b869206 100644
--- a/tests/string.test
+++ b/tests/string.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: string.test,v 1.28 2001/04/06 10:50:00 dkf Exp $
+# RCS: @(#) $Id: string.test,v 1.29 2001/05/14 08:57:26 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -197,6 +197,9 @@ test string-4.12 {string first, start index} {
test string-4.13 {string first, start index} {
string first \u7266 abc\u7266x end-2
} 3
+test string-4.14 {string first, negative start index} {
+ string first b abc -1
+} 1
test string-5.1 {string index} {
list [catch {string index} msg] $msg