summaryrefslogtreecommitdiffstats
path: root/tests/basic.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-10 11:56:44 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-10 11:56:44 (GMT)
commitb82fab03b6af98493600f93ab86254446957ffdd (patch)
tree1a37add20fefab1047a8268adf31e600b827891e /tests/basic.test
parentbf3a542777f9aa1164f705b7be08031012208d76 (diff)
downloadtcl-b82fab03b6af98493600f93ab86254446957ffdd.zip
tcl-b82fab03b6af98493600f93ab86254446957ffdd.tar.gz
tcl-b82fab03b6af98493600f93ab86254446957ffdd.tar.bz2
* Cleaned up, constrained, and reduced the amount of [exec] usage
in the test suite.
Diffstat (limited to 'tests/basic.test')
-rw-r--r--tests/basic.test32
1 files changed, 13 insertions, 19 deletions
diff --git a/tests/basic.test b/tests/basic.test
index 61429b3..52c1484 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -15,22 +15,16 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: basic.test,v 1.22 2002/07/04 16:52:07 msofer Exp $
+# RCS: @(#) $Id: basic.test,v 1.23 2002/07/10 11:56:44 dgp Exp $
#
-if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest 2
- namespace import -force ::tcltest::*
-}
+package require tcltest 2
+namespace import -force ::tcltest::*
-::tcltest::testConstraint testcmdtoken \
- [llength [info commands testcmdtoken]]
-::tcltest::testConstraint testcmdtrace \
- [llength [info commands testcmdtrace]]
-::tcltest::testConstraint testcreatecommand \
- [llength [info commands testcreatecommand]]
-::tcltest::testConstraint exec \
- [llength [info commands exec]]
+testConstraint testcmdtoken [llength [info commands testcmdtoken]]
+testConstraint testcmdtrace [llength [info commands testcmdtrace]]
+testConstraint testcreatecommand [llength [info commands testcreatecommand]]
+testConstraint exec [llength [info commands exec]]
# This variable needs to be changed when the major or minor version number for
# Tcl changes.
@@ -561,10 +555,10 @@ test basic-44.1 {Tcl_GlobalEval} {emptyTest} {
test basic-45.1 {Tcl_SetRecursionLimit: see interp.test} {emptyTest} {
} {}
-test basic-46.1 {Tcl_AllowExceptions: exception return not allowed} {exec} {
+test basic-46.1 {Tcl_AllowExceptions: exception return not allowed} {stdio} {
catch {close $f}
set res [catch {
- set f [open |[list [info nameofexecutable]] w+]
+ set f [open |[list [interpreter]] w+]
fconfigure $f -buffering line
puts $f {fconfigure stdout -buffering line}
puts $f continue
@@ -591,7 +585,7 @@ test basic-46.2 {Tcl_AllowExceptions: exception return not allowed} {exec} {
puts hello
break
} BREAKtest]
- set res [list [catch {exec [info nameofexecutable] $fName} msg] $msg]
+ set res [list [catch {exec [interpreter] $fName} msg] $msg]
removeFile BREAKtest
regsub {"[^ ]*BREAKtest"} $res {"BREAKtest"} res
set res
@@ -607,7 +601,7 @@ test basic-46.3 {Tcl_AllowExceptions: exception return not allowed} {exec} {
patch
break
} BREAKtest]
- set res [list [catch {exec [info nameofexecutable] $fName} msg] $msg]
+ set res [list [catch {exec [interpreter] $fName} msg] $msg]
removeFile BREAKtest
regsub {"[^ ]*BREAKtest"} $res {"BREAKtest"} res
set res
@@ -620,7 +614,7 @@ test basic-46.4 {Tcl_AllowExceptions: exception return not allowed} {exec} {
set fName [makeFile {
foo [set a 1] [break]
} BREAKtest]
- set res [list [catch {exec [info nameofexecutable] $fName} msg] $msg]
+ set res [list [catch {exec [interpreter] $fName} msg] $msg]
removeFile BREAKtest
regsub {"[^ ]*BREAKtest"} $res {"BREAKtest"} res
set res
@@ -635,7 +629,7 @@ test basic-46.5 {Tcl_AllowExceptions: exception return not allowed} {exec} {
set fName [makeFile {
return -code return
} BREAKtest]
- set res [list [catch {exec [info nameofexecutable] $fName} msg] $msg]
+ set res [list [catch {exec [interpreter] $fName} msg] $msg]
removeFile BREAKtest
regsub {"[^ ]*BREAKtest"} $res {"BREAKtest"} res
set res