summaryrefslogtreecommitdiffstats
path: root/tests/encoding.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-30 11:42:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-30 11:42:26 (GMT)
commit6f401c3e624c251bbe6f116a38dc1ac035318c29 (patch)
tree08e02dbbddc23846aa5be3fe6762094338d356cb /tests/encoding.test
parent4409afbad7d1d65061c9ae270c3cd589c7230ebb (diff)
downloadtcl-6f401c3e624c251bbe6f116a38dc1ac035318c29.zip
tcl-6f401c3e624c251bbe6f116a38dc1ac035318c29.tar.gz
tcl-6f401c3e624c251bbe6f116a38dc1ac035318c29.tar.bz2
Fix various test when run outside of the build environment [3549770]
Diffstat (limited to 'tests/encoding.test')
-rw-r--r--tests/encoding.test8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index 47bb81e..30aada0 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -15,8 +15,11 @@ namespace eval ::tcl::test::encoding {
namespace import -force ::tcltest::*
-::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch {
+ ::tcltest::loadTestedCommands
+ package require -exact Tcltest [info patchlevel]
+ set ::tcltestlib [lindex [package ifneeded Tcltest [info patchlevel]] 1]
+}
proc toutf {args} {
variable x
@@ -406,6 +409,7 @@ cd [workingDirectory]
# Code to make the next few tests more intelligible; the code being tested
# should be in the body of the test!
proc runInSubprocess {contents {filename iso2022.tcl}} {
+ set contents "load $::tcltestlib Tcltest\n$contents"
set theFile [makeFile $contents $filename]
try {
exec [interpreter] $theFile