diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2008-12-10 18:21:46 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2008-12-10 18:21:46 (GMT) |
commit | 598d01fe5e0f51d30e934c1aba180b32b7733ebc (patch) | |
tree | 1a21e3ccc33a5243f3f2d9bf30b44617c5ff70e3 /tests/scan.test | |
parent | 418c8071f2eaf8ed93cf80189e6b775369dba84b (diff) | |
download | tcl-598d01fe5e0f51d30e934c1aba180b32b7733ebc.zip tcl-598d01fe5e0f51d30e934c1aba180b32b7733ebc.tar.gz tcl-598d01fe5e0f51d30e934c1aba180b32b7733ebc.tar.bz2 |
TIP #343 IMPLEMENTATION - A Binary Specifier for [format/scan]
Diffstat (limited to 'tests/scan.test')
-rw-r--r-- | tests/scan.test | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/scan.test b/tests/scan.test index ef40d4b..4296366 100644 --- a/tests/scan.test +++ b/tests/scan.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: scan.test,v 1.22 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: scan.test,v 1.23 2008/12/10 18:21:47 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -248,10 +248,14 @@ test scan-4.40.2 {Tcl_ScanObjCmd, base-16 integer scanning} { catch {unset x} list [scan {xF} {%x} x] [info exists x] } {0 0} +test scan-4.40.3 {Tcl_ScanObjCmd, base-2 integer scanning} { + set x {} + list [scan {1001 0b101 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000} {%b %b %llb} x y z] $x $y $z +} {3 9 5 340282366920938463463374607431768211456} test scan-4.41 {Tcl_ScanObjCmd, base-unknown integer scanning} { set x {} - list [scan {10 010 0x10} {%i%i%i} x y z] $x $y $z -} {3 10 8 16} + list [scan {10 010 0x10 0b10} {%i%i%i%i} x y z t] $x $y $z $t +} {4 10 8 16 0} test scan-4.42 {Tcl_ScanObjCmd, base-unknown integer scanning} { set x {} list [scan {10 010 0X10} {%i%i%i} x y z] $x $y $z |