Tcl Source Code

Artifact [ce3546f50f]
Login

Artifact ce3546f50f0bcaa0b35fec7e57a42ebc7f71fe8f:

Attachment "460993-alt.diff" to ticket [460993ffff] added by andreas_kupries 2001-09-14 00:06:10.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.607
diff -u -r1.607 ChangeLog
--- ChangeLog	2001/09/13 11:57:26	1.607
+++ ChangeLog	2001/09/13 17:04:10
@@ -1,3 +1,12 @@
+2001-09-13  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-13  Miguel Sofer  <[email protected]>
   
    	* doc/ParseCmd.3:  
@@ -11,7 +20,6 @@
   	same duties but adheres to the standard return convention for Tcl
   	evaluations; the deprecated function could only return TCL_OK or
   	TCL_ERROR, which caused [Bug: 219384] and [Bug: 455151].
-  
 
 2001-09-12  Mo DeJong  <[email protected]>
 
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/13 17:04:10
@@ -237,15 +237,32 @@
 test iocmd-8.10 {fconfigure command} {
     list [catch {fconfigure a b} msg] $msg
 } {1 {can not find channel named "a"}}
+
+makeFile {} fconfigure.dummy
+
 test iocmd-8.11 {fconfigure command} {
-    list [catch {fconfigure stdout -froboz blarfo} msg] $msg
+    set chan [open fconfigure.dummy r]
+    set res [list [catch {fconfigure $chan -froboz blarfo} msg] $msg]
+    close $chan
+    set res
 } {1 {bad option "-froboz": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
+
 test iocmd-8.12 {fconfigure command} {
-    list [catch {fconfigure stdout -b blarfo} msg] $msg
+    set chan [open fconfigure.dummy r]
+    set res [list [catch {fconfigure $chan -b blarfo} msg] $msg]
+    close $chan
+    set res
 } {1 {bad option "-b": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
+
 test iocmd-8.13 {fconfigure command} {
-    list [catch {fconfigure stdout -buffer blarfo} msg] $msg
+    set chan [open fconfigure.dummy r]
+    set res [list [catch {fconfigure $chan -buffer blarfo} msg] $msg]
+    close $chan
+    set res
 } {1 {bad option "-buffer": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
+
+removeFile fconfigure.dummy
+
 test iocmd-8.14 {fconfigure command} {
     fconfigure stdin -buffers
 } 4096