summaryrefslogtreecommitdiffstats
path: root/tests/indexObj.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-16 14:01:45 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-16 14:01:45 (GMT)
commit72000228fc6e9b42002126eaeccfa3f6291e4ddf (patch)
tree9e269a3e4f3b5f62ca6faa924fd98e6b30009313 /tests/indexObj.test
parentc47479ba6c67cf43f292330459141c46ecc8186b (diff)
parent22325d1e0843a7d1511f7ec81a4958939ab3faaf (diff)
downloadtcl-72000228fc6e9b42002126eaeccfa3f6291e4ddf.zip
tcl-72000228fc6e9b42002126eaeccfa3f6291e4ddf.tar.gz
tcl-72000228fc6e9b42002126eaeccfa3f6291e4ddf.tar.bz2
Merge 8.6
Diffstat (limited to 'tests/indexObj.test')
-rw-r--r--tests/indexObj.test30
1 files changed, 19 insertions, 11 deletions
diff --git a/tests/indexObj.test b/tests/indexObj.test
index bd6a2c2..40418b3 100644
--- a/tests/indexObj.test
+++ b/tests/indexObj.test
@@ -91,46 +91,54 @@ test indexObj-4.1 {free old internal representation} testindexobj {
test indexObj-5.1 {Tcl_WrongNumArgs} testindexobj {
testwrongnumargs 1 "?-switch?" mycmd
-} "wrong # args: should be \"mycmd ?-switch?\""
+} {wrong # args: should be "mycmd ?-switch?"}
test indexObj-5.2 {Tcl_WrongNumArgs} testindexobj {
testwrongnumargs 2 "bar" mycmd foo
-} "wrong # args: should be \"mycmd foo bar\""
+} {wrong # args: should be "mycmd foo bar"}
test indexObj-5.3 {Tcl_WrongNumArgs} testindexobj {
testwrongnumargs 0 "bar" mycmd foo
-} "wrong # args: should be \"bar\""
+} {wrong # args: should be "bar"}
test indexObj-5.4 {Tcl_WrongNumArgs} testindexobj {
testwrongnumargs 0 "" mycmd foo
-} "wrong # args: should be \"\""
+} {wrong # args: should be ""}
test indexObj-5.5 {Tcl_WrongNumArgs} testindexobj {
testwrongnumargs 1 "" mycmd foo
-} "wrong # args: should be \"mycmd\""
+} {wrong # args: should be "mycmd"}
test indexObj-5.6 {Tcl_WrongNumArgs} testindexobj {
testwrongnumargs 2 "" mycmd foo
-} "wrong # args: should be \"mycmd foo\""
+} {wrong # args: should be "mycmd foo"}
# Contrast this with test proc-3.6; they have to be like this because
# of [Bug 1066837] so Itcl won't break.
test indexObj-5.7 {Tcl_WrongNumArgs} {testindexobj obsolete} {
testwrongnumargs 2 "fee fi" "fo fum" foo bar
-} "wrong # args: should be \"fo fum foo fee fi\""
+} {wrong # args: should be "fo fum foo fee fi"}
test indexObj-6.1 {Tcl_GetIndexFromObjStruct} testindexobj {
set x a
testgetindexfromobjstruct $x 0
-} "wrong # args: should be \"testgetindexfromobjstruct a 0\""
+} {wrong # args: should be "testgetindexfromobjstruct a 0"}
test indexObj-6.2 {Tcl_GetIndexFromObjStruct} testindexobj {
set x a
testgetindexfromobjstruct $x 0
testgetindexfromobjstruct $x 0
-} "wrong # args: should be \"testgetindexfromobjstruct a 0\""
+} {wrong # args: should be "testgetindexfromobjstruct a 0"}
test indexObj-6.3 {Tcl_GetIndexFromObjStruct} testindexobj {
set x c
testgetindexfromobjstruct $x 1
-} "wrong # args: should be \"testgetindexfromobjstruct c 1\""
+} {wrong # args: should be "testgetindexfromobjstruct c 1"}
test indexObj-6.4 {Tcl_GetIndexFromObjStruct} testindexobj {
set x c
testgetindexfromobjstruct $x 1
testgetindexfromobjstruct $x 1
-} "wrong # args: should be \"testgetindexfromobjstruct c 1\""
+} {wrong # args: should be "testgetindexfromobjstruct c 1"}
+test indexObj-6.5 {Tcl_GetIndexFromObjStruct with TCL_EXACT flag} -constraints testindexobj -body {
+ set x e
+ testgetindexfromobjstruct $x 0 1
+} -returnCodes error -result {bad dummy "e": must be a, c, or ee}
+test indexObj-6.6 {Tcl_GetIndexFromObjStruct with NULL input} -constraints testindexobj -body {
+ set x ""
+ testgetindexfromobjstruct $x 0
+} -returnCodes error -result {ambiguous dummy "": must be a, c, or ee}
test indexObj-7.1 {Tcl_ParseArgsObjv} testparseargs {
testparseargs