diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dict.test | 6 | ||||
-rw-r--r-- | tests/ioCmd.test | 6 | ||||
-rw-r--r-- | tests/string.test | 15 | ||||
-rw-r--r-- | tests/stringComp.test | 6 | ||||
-rw-r--r-- | tests/var.test | 6 |
5 files changed, 24 insertions, 15 deletions
diff --git a/tests/dict.test b/tests/dict.test index e45c954..96c14fa 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.20.2.1 2007/09/09 04:14:29 dgp Exp $ +# RCS: @(#) $Id: dict.test,v 1.20.2.2 2007/11/25 06:45:45 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35,10 +35,10 @@ proc getOrder {dictVal args} { test dict-1.1 {dict command basic syntax} { list [catch {dict} msg] $msg -} {1 {wrong # args: should be "dict subcommand ?arg ...?"}} +} {1 {wrong # args: should be "dict subcommand ?argument ...?"}} test dict-1.2 {dict command basic syntax} { list [catch {dict ?} msg] $msg -} {1 {bad subcommand "?": must be append, create, exists, filter, for, get, incr, info, keys, lappend, merge, remove, replace, set, size, unset, update, values, or with}} +} {1 {unknown or ambiguous subcommand "?": must be append, create, exists, filter, for, get, incr, info, keys, lappend, merge, remove, replace, set, size, unset, update, values, or with}} test dict-2.1 {dict create command} { dict create diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 9eda3f7..6bb72af 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.31.2.2 2007/11/21 06:44:32 dgp Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.31.2.3 2007/11/25 06:45:45 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1732,7 +1732,7 @@ test iocmd-31.1 {chan postevent, restricted to reflected channels} -match glob - close $c removeFile goo set msg -} -result {channel "file*" is not a reflected channel} +} -result {can not find reflected channel named "file*"} test iocmd-31.2 {chan postevent, unwanted events} -match glob -body { set res {} proc foo {args} {oninit; onfinal; track; return} @@ -3182,7 +3182,7 @@ test iocmd.tf-31.8 {chan postevent, bad input} -match glob -body { rename foo {} set res } -constraints {testchannel testthread} \ - -result {{postevent for channel "rc*" called from outside interpreter}} + -result {{can not find reflected channel named "rc*"}} # ### ### ### ######### ######### ######### diff --git a/tests/string.test b/tests/string.test index 134e2cb..29dafcf 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,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.62.2.5 2007/11/21 06:44:32 dgp Exp $ +# RCS: @(#) $Id: string.test,v 1.62.2.6 2007/11/25 06:45:45 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -26,10 +26,10 @@ testConstraint testindexobj [expr {[info commands testindexobj] != {}}] test string-1.1 {error conditions} { list [catch {string gorp a b} msg] $msg -} {1 {bad option "gorp": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} +} {1 {unknown or ambiguous subcommand "gorp": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}} test string-1.2 {error conditions} { list [catch {string} msg] $msg -} {1 {wrong # args: should be "string option arg ?arg ...?"}} +} {1 {wrong # args: should be "string subcommand ?argument ...?"}} test string-2.1 {string compare, too few args} { list [catch {string compare a} msg] $msg @@ -1131,6 +1131,11 @@ test string-12.21 {string range, regenerates correct reps, bug 1410553} { binary scan $rxCRC "H*" rxCRC_hex list $input_hex $rxBuffer_hex $rxCRC_hex } {000341 000341 0341} +test string-12.22 {string range, shimmering binary/index} { + set s 0000000001 + binary scan $s a* x + string range $s $s end +} 000000001 test string-13.1 {string repeat} { list [catch {string repeat} msg] $msg @@ -1357,7 +1362,7 @@ test string-20.1 {string trimright errors} { } {1 {wrong # args: should be "string trimright string ?chars?"}} test string-20.2 {string trimright errors} { list [catch {string trimg a} msg] $msg -} {1 {bad option "trimg": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} +} {1 {unknown or ambiguous subcommand "trimg": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}} test string-20.3 {string trimright} { string trimright " XYZ " } { XYZ} @@ -1413,7 +1418,7 @@ test string-21.14 {string wordend, unicode} { test string-22.1 {string wordstart} { list [catch {string word a} msg] $msg -} {1 {ambiguous option "word": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} +} {1 {unknown or ambiguous subcommand "word": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}} test string-22.2 {string wordstart} { list [catch {string wordstart a} msg] $msg } {1 {wrong # args: should be "string wordstart string index"}} diff --git a/tests/stringComp.test b/tests/stringComp.test index 3ccfc75..dfbe57f 100644 --- a/tests/stringComp.test +++ b/tests/stringComp.test @@ -15,7 +15,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.11.2.2 2007/10/16 03:50:33 dgp Exp $ +# RCS: @(#) $Id: stringComp.test,v 1.11.2.3 2007/11/25 06:45:45 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -29,11 +29,11 @@ testConstraint testobj [expr {[info commands testobj] != {}}] test stringComp-1.1 {error conditions} { proc foo {} {string gorp a b} list [catch {foo} msg] $msg -} {1 {bad option "gorp": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}} +} {1 {unknown or ambiguous subcommand "gorp": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}} test stringComp-1.2 {error conditions} { proc foo {} {string} list [catch {foo} msg] $msg -} {1 {wrong # args: should be "string option arg ?arg ...?"}} +} {1 {wrong # args: should be "string subcommand ?argument ...?"}} test stringComp-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. diff --git a/tests/var.test b/tests/var.test index 57c6fe4..42a1024 100644 --- a/tests/var.test +++ b/tests/var.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: var.test,v 1.28 2007/03/12 18:06:14 dgp Exp $ +# RCS: @(#) $Id: var.test,v 1.28.2.1 2007/11/25 06:45:45 dgp Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -680,6 +680,10 @@ test var-14.1 {array names syntax} -body { array names foo bar baz snafu } -returnCodes 1 -match glob -result * +test var-14.2 {array names -glob} -body { + array names tcl_platform -glob os +} -returnCodes 0 -match exact -result os + test var-15.1 {segfault in [unset], [Bug 735335]} { proc A { name } { upvar $name var |