diff options
| author | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-04-16 12:58:24 (GMT) |
|---|---|---|
| committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-04-16 12:58:24 (GMT) |
| commit | 4655526dd72cdeab8558be6bf5bbddc7f98e51dc (patch) | |
| tree | c7dac064c33cd52392544d15d5a37a643e83b49c | |
| parent | b37682866bd66ee69010f4794dce2c24f02844df (diff) | |
| download | tcl-4655526dd72cdeab8558be6bf5bbddc7f98e51dc.zip tcl-4655526dd72cdeab8558be6bf5bbddc7f98e51dc.tar.gz tcl-4655526dd72cdeab8558be6bf5bbddc7f98e51dc.tar.bz2 | |
Fix mistake in test io-75.14 and make some spelling corrections.
| -rw-r--r-- | tests/io.test | 27 | ||||
| -rw-r--r-- | tests/ioCmd.test | 2 |
2 files changed, 14 insertions, 15 deletions
diff --git a/tests/io.test b/tests/io.test index d98317a..f1966c7 100644 --- a/tests/io.test +++ b/tests/io.test @@ -9273,7 +9273,6 @@ test io-75.6 {invalid utf-8 encoding, gets is not ignored (-profile strict)} -se fconfigure $f -encoding utf-8 -buffering none -eofchar {} \ -translation lf -profile strict } -body { -after 1 gets $f } -cleanup { close $f @@ -9450,23 +9449,23 @@ test io-75.14 { invalid utf-8 encoding [gets] continues in non-strict mode after error } -setup { - set chan [file tempfile] - fconfigure $f -encoding binary + set chan [file tempfile] + fconfigure $chan -encoding binary # \xc0\n is an invalid utf-8 sequence - puts -nonewline $f a\nb\nc\xc0\nd\n - flush $f - seek $f 0 - fconfigure $f -encoding utf-8 -buffering none -eofchar {} \ + puts -nonewline $chan a\nb\nc\xc0\nd\n + flush $chan + seek $chan 0 + fconfigure $chan -encoding utf-8 -buffering none -eofchar {} \ -translation lf -profile strict } -body { - lappend res [gets $f] - lappend res [gets $f] - set status [catch {gets $f} cres copts] + lappend res [gets $chan] + lappend res [gets $chan] + set status [catch {gets $chan} cres copts] lappend res $status $cres - chan configure $f -profile tcl8 - lappend res [gets $f] - lappend res [gets $f] - close $f + chan configure $chan -profile tcl8 + lappend res [gets $chan] + lappend res [gets $chan] + close $chan return $res } -match glob -result {a b 1 {error reading "*":\ invalid or incomplete multibyte or wide character} cÀ d} diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 4163b1b..5d731b9 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -1058,7 +1058,7 @@ test iocmd-23.1 {chan read, regular data return} -match glob -body { rename foo {} set res } -result {{read rc* 4096} {read rc* 4096} snarfsnarf} -test iocmd-23.2 {chan read, bad data return, to much} -match glob -body { +test iocmd-23.2 {chan read, bad data return, too much} -match glob -body { set res {} proc foo {args} { oninit; onfinal; track |
