Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Tests using viewFile fail

Closed / Fixed578163ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-07-06 17:57:00
In the current HEAD, tests that use the [viewFile] command
are still failing; we need to reconcile the Tcl tests with
the tcltest package changes one way or the other.


==== io-34.11 Tcl_Seek testing flushing of buffered output FAILED
==== Contents of test case:

    set f [open $path(test3) w]
    puts $f xyz\n123
    close $f
    set f [open $path(test3) w+]
    puts $f xyzzy
    seek $f 2
    set x [gets $f]
    close $f
    list $x [viewFile test3]

---- Result was:
zzy {xyzzy
}
---- Result should have been (exact matching):
zzy xyzzy
==== io-34.11 FAILED


==== io-40.7 POSIX open access modes: EXCL FAILED
==== Contents of test case:

    removeFile test3
    set f [open $path(test3) {WRONLY CREAT EXCL}]
    fconfigure $f -eofchar {}
    puts $f "A test line"
    close $f
    viewFile test3

---- Result was:
A test line

---- Result should have been (exact matching):
A test line
==== io-40.7 FAILED
dgpplain2002-07-07 01:22:57
Logged In: YES 
user_id=80530


Perhaps an effect of using 
binary-encoding to read in the
file?

Did these tests work in Tcl 8.4a4,
or were they constrained to keep
from running?

[viewFile] has been converted to
read directly using a binary encoding,
where it used to [exec] a "cat" program.
vincentdarley Ticket [578163ffff]: 1 change [History diff]2002-07-08 19:26:23
vincentdarleyplain2002-07-08 19:26:24
Logged In: YES 
user_id=32170

These tests used to work. They were broken (together 
with exec-18.1) with the recent test suite/tcltest 
changes.
dgpplain2002-07-09 03:44:03
Logged In: YES 
user_id=80530

committed fix to HEAD, bumping to tcltest 2.2.1.

Please test.
Log in (anonymous is fine) to add a comment.