summaryrefslogtreecommitdiffstats
path: root/tests/exec.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-05-07 10:34:42 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-05-07 10:34:42 (GMT)
commit33fd9238dc467ef70e757a917e4c8ddd2dd7d78e (patch)
tree8d6391699c15edb848ea83590d018902258f0b4d /tests/exec.test
parent8af7bf38453d71fecfc5e4e507d92e5220b5d5be (diff)
downloadtcl-33fd9238dc467ef70e757a917e4c8ddd2dd7d78e.zip
tcl-33fd9238dc467ef70e757a917e4c8ddd2dd7d78e.tar.gz
tcl-33fd9238dc467ef70e757a917e4c8ddd2dd7d78e.tar.bz2
Fix [Bug 1513659].
Diffstat (limited to 'tests/exec.test')
-rw-r--r--tests/exec.test17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/exec.test b/tests/exec.test
index e8b0e66..297278f 100644
--- a/tests/exec.test
+++ b/tests/exec.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: exec.test,v 1.31 2008/07/21 21:25:21 nijtmans Exp $
+# RCS: @(#) $Id: exec.test,v 1.32 2009/05/07 10:34:42 dkf Exp $
package require tcltest 2
namespace import -force ::tcltest::*
@@ -114,7 +114,8 @@ proc readfile filename {
close $f
return [string trimright $d \n]
}
-
+
+# ----------------------------------------------------------------------
# Basic operations.
test exec-1.1 {basic exec operation} {exec} {
@@ -152,6 +153,8 @@ test exec-2.5 {redirecting input from immediate source} {exec} {
exec [interpreter] $path(cat) "<<Joined to arrows"
} {Joined to arrows}
test exec-2.6 {redirecting input from immediate source, with UTF} -setup {
+ set sysenc [encoding system]
+ encoding system iso8859-1
proc quotenonascii s {
regsub -all {\[|\\|\]} $s {\\&} s
regsub -all {[\u007f-\uffff]} $s \
@@ -163,6 +166,9 @@ test exec-2.6 {redirecting input from immediate source, with UTF} -setup {
# If it does, this means that the UTF -> external conversion did not occur
# before writing out the temp file.
quotenonascii [exec [interpreter] $path(cat) << "\uE9\uE0\uFC\uF1"]
+} -cleanup {
+ encoding system $sysenc
+ rename quotenonascii {}
} -result {\u00e9\u00e0\u00fc\u00f1}
# I/O redirection: output to file.
@@ -669,7 +675,8 @@ test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix} -setup {
} -cleanup {
removeFile $tmpfile
} -result 14
-
+
+# ----------------------------------------------------------------------
# cleanup
foreach file {gorp.file gorp.file2 echo echo2 cat wc sh sh2 sleep exit err} {
@@ -679,3 +686,7 @@ unset -nocomplain path
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: