summaryrefslogtreecommitdiffstats
path: root/tests/init.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-06-21 16:28:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-06-21 16:28:34 (GMT)
commitf271c4ad0a19d06b3f42aa7ab22f92a4ebc0879e (patch)
tree54b585e192a043e869013c7ddbc625ea2173573b /tests/init.test
parent83102e6f2f98d36d59b7b69132074e9724dc2feb (diff)
downloadtcl-f271c4ad0a19d06b3f42aa7ab22f92a4ebc0879e.zip
tcl-f271c4ad0a19d06b3f42aa7ab22f92a4ebc0879e.tar.gz
tcl-f271c4ad0a19d06b3f42aa7ab22f92a4ebc0879e.tar.bz2
Backport tcltest 2.3.3 for release with Tcl 8.5.*
Diffstat (limited to 'tests/init.test')
-rw-r--r--tests/init.test29
1 files changed, 13 insertions, 16 deletions
diff --git a/tests/init.test b/tests/init.test
index 7bdbd82..aaa4c4f 100644
--- a/tests/init.test
+++ b/tests/init.test
@@ -53,21 +53,18 @@ test init-1.7 {auto_qualify - multiples colons 1} {
test init-1.8 {auto_qualify - multiple colons 2} {
auto_qualify :::foo ::bar
} foo
-
+
# we use a sub interp and auto_reset and double the tests because there is 2
# places where auto_loading occur (before loading the indexes files and after)
set testInterp [interp create]
-interp eval $testInterp [list set argv $argv]
-interp eval $testInterp [list package require tcltest]
-interp eval $testInterp [list namespace import -force ::tcltest::*]
-
+tcltest::loadIntoSlaveInterpreter $testInterp {*}$argv
interp eval $testInterp {
-
-auto_reset
-catch {rename parray {}}
-
+ namespace import -force ::tcltest::*
+ auto_reset
+ catch {rename parray {}}
+
test init-2.0 {load parray - stage 1} {
set ret [catch {parray} error]
rename parray {} ; # remove it, for the next test - that should not fail.
@@ -148,12 +145,12 @@ test init-3.0 {random stuff in the auto_index, should still work} {
set count 0
foreach arg [subst -nocommands -novariables {
- c
- {argument
+ c
+ {argument
which spans
multiple lines}
- {argument which is all on one line but which is of such great length that the Tcl C library will truncate it when appending it onto the global error stack}
- {argument which spans multiple lines
+ {argument which is all on one line but which is of such great length that the Tcl C library will truncate it when appending it onto the global error stack}
+ {argument which spans multiple lines
and is long enough to be truncated and
" <- includes a false lead in the prune point search
and must be longer still to force truncation}
@@ -162,13 +159,13 @@ foreach arg [subst -nocommands -novariables {
error stack cannot be uniquely determined.
foo bar foo
"}
- {contrived example: rare circumstance
+ {contrived example: rare circumstance
where the point at which to prune the
error stack cannot be uniquely determined.
foo bar
"}
- {argument that contains non-ASCII character, \u20ac, and which is of such great length that it will be longer than 150 bytes so it will be truncated by the Tcl C library}
- }] {
+ {argument that contains non-ASCII character, \u20ac, and which is of such great length that it will be longer than 150 bytes so it will be truncated by the Tcl C library}
+ }] { ;# emacs needs -> "
test init-4.$count.0 {::errorInfo produced by [unknown]} {
auto_reset