diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-16 14:34:53 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-16 14:34:53 (GMT) |
commit | 16c12a1860ce634a3c4089acc78008050975069f (patch) | |
tree | cd0b608b8b5b0608238bbb4def2a15458d819e5c /tests/indexObj.test | |
parent | 7412df76287c6bb7de3d7277b35b2435b368a9e5 (diff) | |
parent | 72000228fc6e9b42002126eaeccfa3f6291e4ddf (diff) | |
download | tcl-16c12a1860ce634a3c4089acc78008050975069f.zip tcl-16c12a1860ce634a3c4089acc78008050975069f.tar.gz tcl-16c12a1860ce634a3c4089acc78008050975069f.tar.bz2 |
Merge 8.7
Diffstat (limited to 'tests/indexObj.test')
-rw-r--r-- | tests/indexObj.test | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/tests/indexObj.test b/tests/indexObj.test index c615e15..42c67b2 100644 --- a/tests/indexObj.test +++ b/tests/indexObj.test @@ -91,47 +91,55 @@ 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\"" -test indexObj-6.5 {Tcl_GetIndexFromObjStruct} testindexobj { +} {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-6.7 {Tcl_GetIndexFromObjStruct} testindexobj { set x "" testgetindexfromobjstruct $x -1 4 } "wrong # args: should be \"testgetindexfromobjstruct {} -1 4\"" |