diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-25 12:22:16 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-25 12:22:16 (GMT) |
commit | 2645c0ef3a6224d21261691e789a43332d87b5e5 (patch) | |
tree | c261490c8b413208fd28174c52e9044de53d3853 /tests | |
parent | c26df8ae12952ac4cbe9be469b02ff5a5ffb2eea (diff) | |
download | tcl-2645c0ef3a6224d21261691e789a43332d87b5e5.zip tcl-2645c0ef3a6224d21261691e789a43332d87b5e5.tar.gz tcl-2645c0ef3a6224d21261691e789a43332d87b5e5.tar.bz2 |
If TCL_NO_DEPRECATED is defined, remove the "case" statement, and use much less interp->result. Implementation mostly taken over from "novem". If TCL_NO_DEPRECATED is not defined, nothing changes.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/case.test | 5 | ||||
-rw-r--r-- | tests/result.test | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/case.test b/tests/case.test index 6d63cea..d7558a9 100644 --- a/tests/case.test +++ b/tests/case.test @@ -11,6 +11,11 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. +if {![llength [info commands case]]} { + # No "case" command? So no need to test + return +} + if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* diff --git a/tests/result.test b/tests/result.test index 9e8a66b..859e546 100644 --- a/tests/result.test +++ b/tests/result.test @@ -31,7 +31,7 @@ test result-1.2 {Tcl_SaveInterpResult} {testsaveresult} { } {append result} test result-1.3 {Tcl_SaveInterpResult} {testsaveresult} { testsaveresult dynamic {set x 42} 0 -} {dynamic result notCalled present} +} {dynamic result presentOrFreed} test result-1.4 {Tcl_SaveInterpResult} {testsaveresult} { testsaveresult object {set x 42} 0 } {object result same} @@ -43,7 +43,7 @@ test result-1.6 {Tcl_SaveInterpResult} {testsaveresult} { } {42} test result-1.7 {Tcl_SaveInterpResult} {testsaveresult} { testsaveresult dynamic {set x 42} 1 -} {42 called missing} +} {42 presentOrFreed} test result-1.8 {Tcl_SaveInterpResult} {testsaveresult} { testsaveresult object {set x 42} 1 } {42 different} |