summaryrefslogtreecommitdiffstats
path: root/tests/scan.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scan.test')
-rw-r--r--tests/scan.test14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/scan.test b/tests/scan.test
index b37ce0c..6e1ccb0 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -98,10 +98,10 @@ test scan-3.13 {ValidateFormat} {
test scan-4.1 {Tcl_ScanObjCmd, argument checks} {
list [catch {scan} msg] $msg
-} {1 {wrong # args: should be "scan string format ?varName varName ...?"}}
+} {1 {wrong # args: should be "scan string format ?varName ...?"}}
test scan-4.2 {Tcl_ScanObjCmd, argument checks} {
list [catch {scan string} msg] $msg
-} {1 {wrong # args: should be "scan string format ?varName varName ...?"}}
+} {1 {wrong # args: should be "scan string format ?varName ...?"}}
test scan-4.3 {Tcl_ScanObjCmd, argument checks} {
# degenerate case, before changed from 8.2 to 8.3
list [catch {scan string format} msg] $msg
@@ -246,10 +246,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
@@ -507,7 +511,7 @@ test scan-8.1 {error conditions} {
test scan-8.2 {error conditions} {
catch {scan a} msg
set msg
-} {wrong # args: should be "scan string format ?varName varName ...?"}
+} {wrong # args: should be "scan string format ?varName ...?"}
test scan-8.3 {error conditions} {
list [catch {scan a %D x} msg] $msg
} {1 {bad scan conversion character "D"}}