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)
commit3722d1577d251a040ff984825a129ff33323e622 (patch)
tree08e02dbbddc23846aa5be3fe6762094338d356cb /tests/encoding.test
parent780280cdf8a037b0710a4b8ccdcbfd0d4917bcf5 (diff)
downloadtcl-3722d1577d251a040ff984825a129ff33323e622.zip
tcl-3722d1577d251a040ff984825a129ff33323e622.tar.gz
tcl-3722d1577d251a040ff984825a129ff33323e622.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