summaryrefslogtreecommitdiffstats
path: root/tests/binary.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-02-21 21:54:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-02-21 21:54:09 (GMT)
commitd1d1ade757f71ccd5e5be666a7778ae905b351eb (patch)
tree2b1952a79ca322fc842bedef915b3821fb6ffbf8 /tests/binary.test
parent73126af737ee9804ffed26a31c476a9fd50074c2 (diff)
downloadtcl-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/binary.test')
-rw-r--r--tests/binary.test10
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