diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2022-07-12 03:10:50 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2022-07-12 03:10:50 (GMT) |
commit | 91982ba7527160c9c64c671e494999b3dbf54490 (patch) | |
tree | 9a1335157421fc1149173571ecef5e1a94269a06 | |
parent | b88529b2f5c7184710ca00b133bccd5660daf989 (diff) | |
download | tcl-91982ba7527160c9c64c671e494999b3dbf54490.zip tcl-91982ba7527160c9c64c671e494999b3dbf54490.tar.gz tcl-91982ba7527160c9c64c671e494999b3dbf54490.tar.bz2 |
Fix Windows console fconfigure tests to require interactive constraint.
Note this means tests are disabled when run with nmake test
-rw-r--r-- | tests/winConsole.test | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/winConsole.test b/tests/winConsole.test index a9d9b09..0daf54c 100644 --- a/tests/winConsole.test +++ b/tests/winConsole.test @@ -122,7 +122,6 @@ test console-input-2.1 {Console file channel: non-blocking read} -constraints { # Output tests test console-output-1.0 {Console blocking puts stdout} -constraints {win interactive} -body { - puts [fconfigure stdin] puts stdout "123" yesno "Did you see the string \"123\"?" } -result 1 @@ -187,7 +186,7 @@ test console-fconfigure-get-1.[incr testnum] { test console-fconfigure-get-1.[incr testnum] { fconfigure -winsize -} -constraints win -body { +} -constraints {win interactive} -body { fconfigure stdin -winsize } -result {bad option "-winsize": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, or -inputmode} -returnCodes error @@ -211,19 +210,21 @@ foreach chan {stdout stderr} major {2 3} { } -result $result } - test console-fconfigure-get-$major.[incr testnum] "Console get $chan option -winsize" -constraints {win interactive} -body { + test console-fconfigure-get-$major.[incr testnum] "Console get $chan option -winsize" \ + -constraints {win interactive} -body { fconfigure $chan -winsize } -result {\d+ \d+} -match regexp - test console-fconfigure-get-$major.[incr testnum] "Console get $chan option -buffering" -constraints {win interactive} -body { + test console-fconfigure-get-$major.[incr testnum] "Console get $chan option -buffering" \ + -constraints {win interactive} -body { fconfigure $chan -buffering } -result [expr {$chan eq "stdout" ? "line" : "none"}] test console-fconfigure-get-$major.[incr testnum] { fconfigure -inputmode - } -constraints win -body { + } -constraints {win interactive} -body { fconfigure $chan -inputmode - } -result {bad option "-inputmode": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation} -returnCodes error + } -result {bad option "-inputmode": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, or -winsize} -returnCodes error } @@ -291,7 +292,7 @@ test console-fconfigure-set-1.2 { test console-fconfigure-set-1.3 { fconfigure stdin -winsize -} -constraints win -body { +} -constraints {win interactive} -body { fconfigure stdin -winsize {10 30} } -result {bad option "-winsize": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, or -inputmode} -returnCodes error @@ -299,13 +300,13 @@ test console-fconfigure-set-1.3 { test console-fconfigure-set-2.0 { fconfigure stdout -winsize -} -body { +} -constraints {win interactive} -body { fconfigure stdout -winsize {10 30} } -result {bad option "-winsize": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation} -returnCodes error test console-fconfigure-set-3.0 { fconfigure stderr -winsize -} -body { +} -constraints {win interactive} -body { fconfigure stderr -winsize {10 30} } -result {bad option "-winsize": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation} -returnCodes error |