diff options
author | stanton <stanton> | 1999-05-04 01:33:10 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-05-04 01:33:10 (GMT) |
commit | cbfd4003a1395d9f6ec97acf62eb239f7c3fafca (patch) | |
tree | eaaa5805340e4ca7c3da51d93e2076081ec153e5 /tests/cmdMZ.test | |
parent | 1b188bce8407ab0d9d83e72177b9fada135782d2 (diff) | |
download | tcl-cbfd4003a1395d9f6ec97acf62eb239f7c3fafca.zip tcl-cbfd4003a1395d9f6ec97acf62eb239f7c3fafca.tar.gz tcl-cbfd4003a1395d9f6ec97acf62eb239f7c3fafca.tar.bz2 |
* tests/cmdIL.test:
* tests/cmdMZ.test:
* tests/error.test:
* tests/lindex.test:
* tests/linsert.test:
* tests/lrange.test:
* tests/lreplace.test:
* tests/string.test:
* generic/tclCmdMZ.c (Tcl_StringObjCmd):
* generic/tclUtil.c (TclGetIntForIndex): Applied Jeff Hobbs's
string patch which includes the following changes [Bug: 1845]:
Diffstat (limited to 'tests/cmdMZ.test')
-rw-r--r-- | tests/cmdMZ.test | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index 4cd72d2..c9ead57 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.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: cmdMZ.test,v 1.2 1999/04/16 00:47:24 stanton Exp $ +# RCS: @(#) $Id: cmdMZ.test,v 1.3 1999/05/04 01:33:11 stanton Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -159,14 +159,14 @@ test cmdMZ-5.1 {Tcl_StringObjCmd: error conditions} { } {1 {wrong # args: should be "string option arg ?arg ...?"}} test cmdMZ-5.2 {Tcl_StringObjCmd: error conditions} { list [catch {string gorp a b} msg] $msg -} {1 {bad option "gorp": must be compare, first, index, last, length, match, range, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} +} {1 {bad option "gorp": must be bytes, compare, equal, first, icompare, iequal, index, last, length, map, match, range, repeat, replace, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} test cmdMZ-6.1 {Tcl_StringObjCmd: string compare} { list [catch {string compare a} msg] $msg -} {1 {wrong # args: should be "string compare string1 string2"}} +} {1 {wrong # args: should be "string compare string1 string2 ?length?"}} test cmdMZ-6.2 {Tcl_StringObjCmd: string compare} { list [catch {string compare a b c} msg] $msg -} {1 {wrong # args: should be "string compare string1 string2"}} +} {1 {expected integer but got "c"}} test cmdMZ-6.3 {Tcl_StringObjCmd: string compare} { string compare abcde abdef } -1 @@ -237,12 +237,12 @@ test cmdMZ-8.2 {Tcl_StringObjCmd: string index} { } {1 {wrong # args: should be "string index string charIndex"}} test cmdMZ-8.3 {Tcl_StringObjCmd: string index} { list [catch {string index a xyz} msg] $msg -} {1 {expected integer but got "xyz"}} +} {1 {syntax error in expression "xyz"}} test cmdMZ-8.4 {Tcl_StringObjCmd: string index} { string index abcde 0 } a test cmdMZ-8.5 {Tcl_StringObjCmd: string index} { - string i abcde 4 + string in abcde 4 } e test cmdMZ-8.6 {Tcl_StringObjCmd: string index} { string index abcde 5 @@ -305,7 +305,7 @@ test cmdMZ-11.3 {Tcl_StringObjCmd: string match} { string match abc abc } 1 test cmdMZ-11.4 {Tcl_StringObjCmd: string match} { - string m abc abd + string mat abc abd } 0 test cmdMZ-12.1 {Tcl_StringObjCmd: string range} { @@ -319,10 +319,10 @@ test cmdMZ-12.3 {Tcl_StringObjCmd: string range} { } {1 {wrong # args: should be "string range string first last"}} test cmdMZ-12.4 {Tcl_StringObjCmd: string range} { list [catch {string range abc abc 1} msg] $msg -} {1 {bad index "abc": must be integer or "end"}} +} {1 {syntax error in expression "abc"}} test cmdMZ-12.5 {Tcl_StringObjCmd: string range} { list [catch {string range abc 1 eof} msg] $msg -} {1 {bad index "eof": must be integer or "end"}} +} {1 {syntax error in expression "eof"}} test cmdMZ-12.6 {Tcl_StringObjCmd: string range, first < 0} { string range abcdefghijklmnop -3 2 } {abc} @@ -362,10 +362,10 @@ test cmdMZ-12.17 {Tcl_StringObjCmd: string range, unicode} { test cmdMZ-13.1 {Tcl_StringObjCmd: string tolower} { list [catch {string tolower} msg] $msg -} {1 {wrong # args: should be "string tolower string"}} +} {1 {wrong # args: should be "string tolower string ?first? ?last?"}} test cmdMZ-13.2 {Tcl_StringObjCmd: string tolower} { list [catch {string tolower a b} msg] $msg -} {1 {wrong # args: should be "string tolower string"}} +} {1 {syntax error in expression "b"}} test cmdMZ-13.3 {Tcl_StringObjCmd: string tolower} { string tolower ABCDeF } {abcdef} @@ -381,10 +381,10 @@ test cmdMZ-13.6 {Tcl_StringObjCmd: string tolower, unicode} { test cmdMZ-14.1 {Tcl_StringObjCmd: string toupper} { list [catch {string toupper} msg] $msg -} {1 {wrong # args: should be "string toupper string"}} +} {1 {wrong # args: should be "string toupper string ?first? ?last?"}} test cmdMZ-14.2 {Tcl_StringObjCmd: string toupper} { list [catch {string toupper a b} msg] $msg -} {1 {wrong # args: should be "string toupper string"}} +} {1 {syntax error in expression "b"}} test cmdMZ-14.3 {Tcl_StringObjCmd: string toupper} { string toupper abCDEf } {ABCDEF} @@ -400,10 +400,10 @@ test cmdMZ-14.6 {Tcl_StringObjCmd: string toupper, unicode} { test cmdMZ-15.1 {Tcl_StringObjCmd: string totitle} { list [catch {string totitle} msg] $msg -} {1 {wrong # args: should be "string totitle string"}} +} {1 {wrong # args: should be "string totitle string ?first? ?last?"}} test cmdMZ-15.2 {Tcl_StringObjCmd: string totitle} { list [catch {string totitle a b} msg] $msg -} {1 {wrong # args: should be "string totitle string"}} +} {1 {syntax error in expression "b"}} test cmdMZ-15.3 {Tcl_StringObjCmd: string totitle} { string totitle abCDEf } {Abcdef} @@ -478,7 +478,7 @@ test cmdMZ-18.4 {Tcl_StringObjCmd: string trimright errors} { } {1 {wrong # args: should be "string trimright string ?chars?"}} test cmdMZ-18.5 {Tcl_StringObjCmd: string trimright errors} { list [catch {string trimg a} msg] $msg -} {1 {bad option "trimg": must be compare, first, index, last, length, match, range, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} +} {1 {bad option "trimg": must be bytes, compare, equal, first, icompare, iequal, index, last, length, map, match, range, repeat, replace, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} test cmdMZ-19.1 {Tcl_StringObjCmd: string wordend} { list [catch {string wordend a} msg] $msg @@ -488,7 +488,7 @@ test cmdMZ-19.2 {Tcl_StringObjCmd: string wordend} { } {1 {wrong # args: should be "string wordend string index"}} test cmdMZ-19.3 {Tcl_StringObjCmd: string wordend} { list [catch {string wordend a gorp} msg] $msg -} {1 {expected integer but got "gorp"}} +} {1 {syntax error in expression "gorp"}} test cmdMZ-19.4 {Tcl_StringObjCmd: string wordend} { string wordend abc. -1 } 3 @@ -522,7 +522,7 @@ test cmdMZ-19.13 {Tcl_StringObjCmd: string wordend, unicode} { test cmdMZ-20.1 {Tcl_StringObjCmd: string wordstart} { list [catch {string word a} msg] $msg -} {1 {ambiguous option "word": must be compare, first, index, last, length, match, range, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} +} {1 {ambiguous option "word": must be bytes, compare, equal, first, icompare, iequal, index, last, length, map, match, range, repeat, replace, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} test cmdMZ-20.2 {Tcl_StringObjCmd: string wordstart} { list [catch {string wordstart a} msg] $msg } {1 {wrong # args: should be "string wordstart string index"}} @@ -531,7 +531,7 @@ test cmdMZ-20.3 {Tcl_StringObjCmd: string wordstart} { } {1 {wrong # args: should be "string wordstart string index"}} test cmdMZ-20.4 {Tcl_StringObjCmd: string wordstart} { list [catch {string wordstart a gorp} msg] $msg -} {1 {expected integer but got "gorp"}} +} {1 {syntax error in expression "gorp"}} test cmdMZ-20.5 {Tcl_StringObjCmd: string wordstart} { string wordstart "one two three_words" 400 } 8 |