summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-07-16 10:02:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-07-16 10:02:02 (GMT)
commit54c72fdcab114a768b54bd1dfd06912b79dc0da0 (patch)
tree17150e3e7f9f402236d0267308e10b72b4cc438a /tests/io.test
parent19e38811559271a3d6c390847ee1f8a206d65a50 (diff)
downloadtcl-54c72fdcab114a768b54bd1dfd06912b79dc0da0.zip
tcl-54c72fdcab114a768b54bd1dfd06912b79dc0da0.tar.gz
tcl-54c72fdcab114a768b54bd1dfd06912b79dc0da0.tar.bz2
Modify the "gettimes" test-command to use the Tcl_Obj API.
New "testbytestring" command which can be used to replace the (to-be-deprecated) "bytestring" command from tcltest and/or the "indentity" encoding. Adapt many testcases to use the "testbytestring" command.
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/io.test b/tests/io.test
index a7a666a..bf5adb0 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -13,14 +13,16 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-if {[catch {package require tcltest 2}]} {
- puts stderr "Skipping tests in [info script]. tcltest 2 required."
- return
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2
+ namespace import -force ::tcltest::*
}
::tcltest::loadTestedCommands
catch [list package require -exact Tcltest [info patchlevel]]
+testConstraint testbytestring [llength [info commands testbytestring]]
+
namespace eval ::tcl::test::io {
namespace import ::tcltest::*
@@ -7860,12 +7862,12 @@ test io-59.1 {Thread reference of channels} {testmainthread testchannel} {
string equal $result [testmainthread]
} {1}
-test io-60.1 {writing illegal utf sequences} {openpipe fileevent} {
+test io-60.1 {writing illegal utf sequences} {openpipe fileevent testbytestring} {
# This test will hang in older revisions of the core.
set out [open $path(script) w]
puts $out {
- puts [encoding convertfrom identity \xe2]
+ puts [testbytestring \xe2]
exit 1
}
proc readit {pipe} {