diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-07-16 10:02:02 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-07-16 10:02:02 (GMT) |
commit | 1797998aed8933171252159e04897185043b779a (patch) | |
tree | 17150e3e7f9f402236d0267308e10b72b4cc438a /tests/io.test | |
parent | 0fac79a0fb83abfb15db0859305772d7a64fdc30 (diff) | |
download | tcl-1797998aed8933171252159e04897185043b779a.zip tcl-1797998aed8933171252159e04897185043b779a.tar.gz tcl-1797998aed8933171252159e04897185043b779a.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.test | 12 |
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} { |