diff options
Diffstat (limited to 'tests/cmdInfo.test')
-rw-r--r-- | tests/cmdInfo.test | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/cmdInfo.test b/tests/cmdInfo.test index 611bba8..112318f 100644 --- a/tests/cmdInfo.test +++ b/tests/cmdInfo.test @@ -13,15 +13,11 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest 2 - namespace import -force ::tcltest::* -} +package require tcltest 2 +namespace import ::tcltest::* -::tcltest::testConstraint testcmdinfo \ - [llength [info commands testcmdinfo]] -::tcltest::testConstraint testcmdtoken \ - [llength [info commands testcmdtoken]] +testConstraint testcmdinfo [llength [info commands testcmdinfo]] +testConstraint testcmdtoken [llength [info commands testcmdtoken]] test cmdinfo-1.1 {command procedure and clientData} {testcmdinfo} { testcmdinfo create x1 @@ -69,7 +65,7 @@ test cmdinfo-4.1 {Tcl_GetCommandName/Tcl_GetCommandFullName procedures} \ rename x1 newName set y [testcmdtoken name $x] rename newName x1 - eval lappend y [testcmdtoken name $x] + lappend y {*}[testcmdtoken name $x] } {newName ::newName x1 ::x1} catch {rename newTestCmd {}} @@ -86,7 +82,7 @@ test cmdinfo-5.1 {Names for commands created when inside namespaces} \ }] set y [testcmdtoken name $x] rename ::testCmd newTestCmd - eval lappend y [testcmdtoken name $x] + lappend y {*}[testcmdtoken name $x] } {testCmd ::testCmd newTestCmd ::newTestCmd} test cmdinfo-6.1 {Names for commands created when outside namespaces} \ @@ -94,11 +90,15 @@ test cmdinfo-6.1 {Names for commands created when outside namespaces} \ set x [testcmdtoken create cmdInfoNs1::cmdInfoNs2::testCmd] set y [testcmdtoken name $x] rename cmdInfoNs1::cmdInfoNs2::testCmd newTestCmd2 - eval lappend y [testcmdtoken name $x] + lappend y {*}[testcmdtoken name $x] } {testCmd ::cmdInfoNs1::cmdInfoNs2::testCmd newTestCmd2 ::newTestCmd2} # cleanup catch {namespace delete cmdInfoNs1::cmdInfoNs2 cmdInfoNs1} catch {rename x1 ""} -::tcltest::cleanupTests +cleanupTests return + +# Local Variables: +# mode: tcl +# End: |