diff options
author | dkf <dkf@noemail.net> | 2003-02-21 21:54:08 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2003-02-21 21:54:08 (GMT) |
commit | f18c2f0e0ceb672800ebbb8766da3358eab3b27b (patch) | |
tree | 2b1952a79ca322fc842bedef915b3821fb6ffbf8 /tests/binary.test | |
parent | c1a5060ecaa8310f19d559d4785c97a31c17343b (diff) | |
download | tcl-f18c2f0e0ceb672800ebbb8766da3358eab3b27b.zip tcl-f18c2f0e0ceb672800ebbb8766da3358eab3b27b.tar.gz tcl-f18c2f0e0ceb672800ebbb8766da3358eab3b27b.tar.bz2 |
Stopped sign-bit propagation in [binary scan] of wide values. [Bug #690774]
FossilOrigin-Name: 1ebdea1ccdcfee2043a5f33a45169791238fb14a
Diffstat (limited to 'tests/binary.test')
-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 |