Artifact
7a882ea17fba4e516b8b400b8ecc772106991a02:
Attachment "patch-tests_binary_test" to
ticket [3551813fff]
added by
stwo
2012-07-30 12:52:05.
$OpenBSD$
--- tests/binary.test.orig Sun Jul 29 20:53:40 2012
+++ tests/binary.test Sun Jul 29 21:08:52 2012
@@ -1354,7 +1354,7 @@ test binary-35.1 {Tcl_BinaryObjCmd: scan} {
catch {unset arg1}
catch {unset arg2}
list [catch {binary scan abcdefg a2@a3 arg1 arg2} msg] $msg
-} {1 {missing count for "@" field specifier}}
+} {1 {not enough arguments for all format specifiers}}
test binary-35.2 {Tcl_BinaryObjCmd: scan} {
catch {unset arg1}
catch {unset arg2}
@@ -2425,6 +2425,28 @@ test binary-65.9 {largest significand} ieeeFloatingPoi
binary scan [binary format w 0x4350000000000001] q d
set d
} 18014398509481988.0
+
+test binary-70.1 {Tcl_BinaryObjCmd: scan @} {
+ binary scan abcdefg @ arg1
+ set arg1
+} 0
+test binary-70.2 {Tcl_BinaryObjCmd: scan @} {
+ binary scan abcdefg @@@ arg1 arg2 arg3
+ list $arg1 $arg2 $arg3
+} {0 0 0}
+test binary-70.3 {Tcl_BinaryObjCmd: scan @} {
+ binary scan abcdefg @2@ arg1
+ set arg1
+} 2
+test binary-70.4 {Tcl_BinaryObjCmd: scan @} {
+ binary scan abcdefg c*@ arg1 arg2
+ set arg2
+} 7
+test binary-70.5 {Tcl_BinaryObjCmd: scan @} {
+ binary scan abcdefg I@c@ arg1 arg2 arg3 arg4
+ list $arg2 $arg4
+} {4 5}
+
# cleanup
::tcltest::cleanupTests