summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/chanio.test9
-rw-r--r--tests/io.test4
-rw-r--r--tests/load.test12
3 files changed, 15 insertions, 10 deletions
diff --git a/tests/chanio.test b/tests/chanio.test
index 729b436..c1dba49 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: chanio.test,v 1.22 2009/11/19 21:17:36 nijtmans Exp $
+# RCS: @(#) $Id: chanio.test,v 1.23 2010/02/07 08:03:11 dkf Exp $
if {[catch {package require tcltest 2}]} {
chan puts stderr "Skipping tests in [info script]. tcltest 2 required."
@@ -2115,8 +2115,9 @@ test chan-io-28.4 {Tcl_Chan Close} {testchannel} {
$consoleFileNames]
string compare $l $x
} 0
-test chan-io-28.5 {Tcl_Chan Close vs standard handles} {stdio unix testchannel openpipe} {
+test chan-io-28.5 {Tcl_Chan Close vs standard handles} -setup {
file delete $path(script)
+} -constraints {stdio unix testchannel openpipe} -body {
set f [open $path(script) w]
chan puts $f {
chan close stdin
@@ -2126,8 +2127,8 @@ test chan-io-28.5 {Tcl_Chan Close vs standard handles} {stdio unix testchannel o
set f [open "|[list [interpreter] $path(script)]" r]
set l [chan gets $f]
chan close $f
- set l
-} {file1 file2}
+ lsort $l
+} -result {file1 file2}
test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} -setup {
set cat [makeFile {
fconfigure stdout -buffering line
diff --git a/tests/io.test b/tests/io.test
index 2b08454..c69bff9 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: io.test,v 1.95 2009/11/20 00:19:46 dgp Exp $
+# RCS: @(#) $Id: io.test,v 1.96 2010/02/07 08:03:11 dkf Exp $
if {[catch {package require tcltest 2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2 required."
@@ -2222,7 +2222,7 @@ test io-28.5 {Tcl_Close vs standard handles} {stdio unix testchannel openpipe} {
set f [open "|[list [interpreter] $path(script)]" r]
set l [gets $f]
close $f
- set l
+ lsort $l
} {file1 file2}
test io-29.1 {Tcl_WriteChars, channel not writable} {
diff --git a/tests/load.test b/tests/load.test
index dd3d011..8ecdaf5 100644
--- a/tests/load.test
+++ b/tests/load.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: load.test,v 1.19 2007/12/13 15:26:06 dgp Exp $
+# RCS: @(#) $Id: load.test,v 1.20 2010/02/07 08:03:11 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -43,7 +43,7 @@ testConstraint teststaticpkg [llength [info commands teststaticpkg]]
testConstraint testsimplefilesystem \
[llength [info commands testsimplefilesystem]]
-
+
test load-1.1 {basic errors} {} {
list [catch {load} msg] $msg
} "1 {wrong \# args: should be \"load fileName ?packageName? ?interp?\"}"
@@ -66,7 +66,7 @@ test load-1.6 {basic errors} {} {
test load-2.1 {basic loading, with guess for package name} \
[list $dll $loaded] {
load [file join $testDir pkga$ext]
- list [pkga_eq abc def] [info commands pkga_*]
+ list [pkga_eq abc def] [lsort [info commands pkga_*]]
} {0 {pkga_eq pkga_quote}}
interp create -safe child
test load-2.2 {loading into a safe interpreter, with package name conversion} \
@@ -206,8 +206,12 @@ test load-10.1 {load from vfs} \
-body {list [catch {load simplefs:/pkgd$ext pkgd} msg] $msg} \
-result {0 {}} \
-cleanup {testsimplefilesystem 0; cd $dir; unset dir}
-
+
# cleanup
unset ext
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: