summaryrefslogtreecommitdiffstats
path: root/tests/stringComp.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stringComp.test')
-rw-r--r--tests/stringComp.test11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/stringComp.test b/tests/stringComp.test
index 89b641d..fc2214c 100644
--- a/tests/stringComp.test
+++ b/tests/stringComp.test
@@ -14,7 +14,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: stringComp.test,v 1.2 2001/05/17 02:21:06 hobbs Exp $
+# RCS: @(#) $Id: stringComp.test,v 1.3 2001/08/25 00:08:46 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -34,6 +34,15 @@ test string-1.2 {error conditions} {
proc foo {} {string}
list [catch {foo} msg] $msg
} {1 {wrong # args: should be "string option arg ?arg ...?"}}
+test string-1.3 {error condition - undefined method during compile} {
+ # We don't want this to complain about 'never' because it may never
+ # be called, or string may get redefined. This must compile OK.
+ proc foo {str i} {
+ if {"yes" == "no"} { string never called but complains here }
+ string index $str $i
+ }
+ foo abc 0
+} a
test string-2.1 {string compare, too few args} {
proc foo {} {string compare a}