diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2003-02-21 21:54:09 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2003-02-21 21:54:09 (GMT) |
commit | d1d1ade757f71ccd5e5be666a7778ae905b351eb (patch) | |
tree | 2b1952a79ca322fc842bedef915b3821fb6ffbf8 /tests | |
parent | 73126af737ee9804ffed26a31c476a9fd50074c2 (diff) | |
download | tcl-d1d1ade757f71ccd5e5be666a7778ae905b351eb.zip tcl-d1d1ade757f71ccd5e5be666a7778ae905b351eb.tar.gz tcl-d1d1ade757f71ccd5e5be666a7778ae905b351eb.tar.bz2 |
Stopped sign-bit propagation in [binary scan] of wide values. [Bug #690774]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/binary.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/binary.test b/tests/binary.test index 7fd6871..967fcbc 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.10 2002/10/03 13:34:32 dkf Exp $ +# RCS: @(#) $Id: binary.test,v 1.11 2003/02/21 21:54:11 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1476,6 +1476,14 @@ test binary-44.2 {Tcl_BinaryObjCmd: scan wide int} {} { binary scan lcTolleH w x set x } 5216694956358656876 +test binary-44.3 {Tcl_BinaryObjCmd: scan wide int with bit 31 set} {} { + binary scan [binary format w [expr {wide(3) << 31}]] w x + set x +} 6442450944 +test binary-44.4 {Tcl_BinaryObjCmd: scan wide int with bit 31 set} {} { + binary scan [binary format W [expr {wide(3) << 31}]] W x + set x +} 6442450944 test binary-45.1 {Tcl_BinaryObjCmd: combined wide int handling} { binary scan [binary format sws 16450 -1 19521] c* x |