summaryrefslogtreecommitdiffstats
path: root/tests/init.test
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-16 00:46:29 (GMT)
committerstanton <stanton>1999-04-16 00:46:29 (GMT)
commit97464e6cba8eb0008cf2727c15718671992b913f (patch)
treece9959f2747257d98d52ec8d18bf3b0de99b9535 /tests/init.test
parenta8c96ddb94d1483a9de5e340b740cb74ef6cafa7 (diff)
downloadtcl-97464e6cba8eb0008cf2727c15718671992b913f.zip
tcl-97464e6cba8eb0008cf2727c15718671992b913f.tar.gz
tcl-97464e6cba8eb0008cf2727c15718671992b913f.tar.bz2
merged tcl 8.1 branch back into the main trunk
Diffstat (limited to 'tests/init.test')
-rw-r--r--tests/init.test36
1 files changed, 27 insertions, 9 deletions
diff --git a/tests/init.test b/tests/init.test
index 2cec460..4172606 100644
--- a/tests/init.test
+++ b/tests/init.test
@@ -5,14 +5,16 @@
# errors. No output means no errors were found.
#
# Copyright (c) 1997 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: init.test,v 1.2 1998/09/14 18:40:10 stanton Exp $
+# RCS: @(#) $Id: init.test,v 1.3 1999/04/16 00:47:29 stanton Exp $
-
-if {[string compare test [info procs test]] == 1} then {source defs}
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
# Clear out any namespaces called test_ns_*
catch {eval namespace delete [namespace children :: test_ns_*]}
@@ -58,25 +60,27 @@ test init-1.8 {auto_qualify - multiple colons 2} {
# places where auto_loading occur (before loading the indexes files and after)
set testInterp [interp create]
-interp eval $testInterp [list set VERBOSE $VERBOSE]
-interp eval $testInterp [list set TESTS $TESTS]
+interp eval $testInterp [list set argv $argv]
+interp eval $testInterp [list source [file join $::tcltest::testsDir defs.tcl]]
interp eval $testInterp {
-if {[string compare test [info procs test]] == 1} then {source defs}
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
auto_reset
catch {rename parray {}}
test init-2.0 {load parray - stage 1} {
- set ret [catch {namespace eval ::test {parray}} error]
+ set ret [catch {namespace eval ::tcltest {parray}} error]
rename parray {} ; # remove it, for the next test - that should not fail.
list $ret $error
} {1 {no value given for parameter "a" to "parray"}}
test init-2.1 {load parray - stage 2} {
- set ret [catch {namespace eval ::test {parray}} error]
+ set ret [catch {namespace eval ::tcltest {parray}} error]
list $ret $error
} {1 {no value given for parameter "a" to "parray"}}
@@ -129,7 +133,7 @@ catch {rename ::http::geturl {}}
test init-2.8 {load http::geturl (package)} {
# 3 ':' on purpose
- set ret [catch {namespace eval ::test {http:::geturl}} error]
+ set ret [catch {namespace eval ::tcltest {http:::geturl}} error]
# removing it, for the next test. should not fail.
rename ::http::geturl {} ;
list $ret $error
@@ -145,5 +149,19 @@ test init-3.0 {random stuff in the auto_index, should still work} {
}
+# cleanup
interp delete $testInterp
+::tcltest::cleanupTests
+return
+
+
+
+
+
+
+
+
+
+
+