summaryrefslogtreecommitdiffstats
path: root/tests/string.test
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-12-04 06:16:48 (GMT)
committerhobbs <hobbs>1999-12-04 06:16:48 (GMT)
commit8bd88ae75ebf3df12baf9472747baf999a089c8c (patch)
treede4d563d31e6b705edb459823af308d53d953c2b /tests/string.test
parent0cbb9c47d7cd5a71ca1189ab216bf3ded3800278 (diff)
downloadtcl-8bd88ae75ebf3df12baf9472747baf999a089c8c.zip
tcl-8bd88ae75ebf3df12baf9472747baf999a089c8c.tar.gz
tcl-8bd88ae75ebf3df12baf9472747baf999a089c8c.tar.bz2
* tests/env.test: removed knownBug limitation from working test
* tests/all.tcl: ensured that ::tcltest::testsDirectory would be set to an absolute path * tests/expr-old.test: * tests/parseExpr.test: * tests/string.test: * generic/tclGet.c: * generic/tclInt.h: * generic/tclObj.c: * generic/tclParseExpr.c: * generic/tclUtil.c: * generic/tclExecute.c: added TclCheckBadOctal routine to enhance error message checking for when users use invalid octal numbers (like 08), as well as replumbed the Expr*Funcs with a new VerifyExprObjType to simplify type handling.
Diffstat (limited to 'tests/string.test')
-rw-r--r--tests/string.test9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/string.test b/tests/string.test
index 1e25073..349cba7 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.21 1999/10/21 02:17:57 hobbs Exp $
+# RCS: @(#) $Id: string.test,v 1.22 1999/12/04 06:16:49 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -249,6 +249,13 @@ test string-5.16 {string index, bytearray object with string obj shimmering} {
binary scan $str H* dump
string compare [string index $str 10] \x00
} 0
+test string-5.17 {string index, bad integer} {
+ list [catch {string index "abc" 08} msg] $msg
+} {1 {bad index "08": must be integer or end?-integer? (looks like invalid octal number)}}
+test string-5.18 {string index, bad integer} {
+ list [catch {string index "abc" end-00289} msg] $msg
+} {1 {expected integer but got "-00289" (looks like invalid octal number)}}
+
proc largest_int {} {
# This will give us what the largest valid int on this machine is,