Attachment "460993.diff" to
ticket [460993ffff]
added by
andreas_kupries
2001-09-13 04:35:28.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.605
diff -u -r1.605 ChangeLog
--- ChangeLog 2001/09/12 21:00:18 1.605
+++ ChangeLog 2001/09/12 21:32:49
@@ -1,3 +1,12 @@
+2001-09-12 Andreas Kupries <[email protected]>
+
+ * tests/ioCmd.test: Changed the computation of the result for
+ iocmd-8.1[123] so that the tests work for single- and
+ multi-process execution of the testsuite. Depending on the
+ choice of the user stdout is a tty or not and thus reports
+ different channel options. Fixes [460993] reported by Don
+ Porter.
+
2001-09-12 Mo DeJong <[email protected]>
* unix/configure: Regen.
Index: tests/ioCmd.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/ioCmd.test,v
retrieving revision 1.9
diff -u -r1.9 ioCmd.test
--- tests/ioCmd.test 2001/07/31 19:12:07 1.9
+++ tests/ioCmd.test 2001/09/12 21:32:50
@@ -24,6 +24,21 @@
set executable [list [info nameofexecutable]]
+# Create a list of fconfigure options for stdout. This list has to be
+# in a specific order, which is almost sorted, but not quite. The base
+# options are sorted, but any channel specific options come behind
+# these, independent of alphabetical order. Luckily we have to
+# consider only -mode as a special option.
+
+set stdoutConfiguration [list -blocking -buffering -buffersize -encoding -eofchar -translation]
+
+if {[lsearch -exact [fconfigure stdout] -mode] >= 0} {
+ lappend stdoutConfiguration -mode
+}
+
+set stdoutConfiguration [linsert [join $stdoutConfiguration ", "] end-1 or]
+
+
test iocmd-1.1 {puts command} {
list [catch {puts} msg] $msg
} {1 {wrong # args: should be "puts ?-nonewline? ?channelId? string"}}
@@ -239,13 +254,13 @@
} {1 {can not find channel named "a"}}
test iocmd-8.11 {fconfigure command} {
list [catch {fconfigure stdout -froboz blarfo} msg] $msg
-} {1 {bad option "-froboz": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
+} [list 1 "bad option \"-froboz\": should be one of $stdoutConfiguration"]
test iocmd-8.12 {fconfigure command} {
list [catch {fconfigure stdout -b blarfo} msg] $msg
-} {1 {bad option "-b": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
+} [list 1 "bad option \"-b\": should be one of $stdoutConfiguration"]
test iocmd-8.13 {fconfigure command} {
list [catch {fconfigure stdout -buffer blarfo} msg] $msg
-} {1 {bad option "-buffer": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
+} [list 1 "bad option \"-buffer\": should be one of $stdoutConfiguration"]
test iocmd-8.14 {fconfigure command} {
fconfigure stdin -buffers
} 4096