diff options
Diffstat (limited to 'tests/chan.test')
-rw-r--r-- | tests/chan.test | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/chan.test b/tests/chan.test index 93cadc9..cf83820 100644 --- a/tests/chan.test +++ b/tests/chan.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chan.test,v 1.2 2005/06/07 10:05:01 dkf Exp $ +# RCS: @(#) $Id: chan.test,v 1.3 2005/06/07 20:52:25 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -76,6 +76,19 @@ test chan-14.1 {chan command: tell subcommand} -body { test chan-15.1 {chan command: truncate subcommand} -body { chan truncate foo bar foo bar } -returnCodes error -result "wrong \# args: should be \"chan truncate channelId ?length?\"" +test chan-15.2 {chan command: truncate subcommand} -constraints unix -setup { + set file [makeFile {} testTruncate] + set f [open $file w+] +} -body { + fconfigure $f -translation binary + puts -nonewline $f 12345 + seek $f 0 + chan truncate $f 2 + read $f +} -result 12 -cleanup { + catch {close $f} + catch {removeFile $file} +} cleanupTests return |