diff options
author | Steve Bennett <steveb@workware.net.au> | 2013-11-26 08:27:01 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2013-11-28 07:17:02 +1000 |
commit | 2448a2047e587cae8a1b2f401607b7b4c3108429 (patch) | |
tree | 60640b3016aa811cb4d78c7c3527a787970e169b /tests | |
parent | 388573d26679efc0d7f6df87f834bdd32da64e5d (diff) | |
download | jimtcl-2448a2047e587cae8a1b2f401607b7b4c3108429.zip jimtcl-2448a2047e587cae8a1b2f401607b7b4c3108429.tar.gz jimtcl-2448a2047e587cae8a1b2f401607b7b4c3108429.tar.bz2 |
Add basic support for [format %b]
Binary conversion
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/format.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/format.test b/tests/format.test index bb45235..d3d7f20 100644 --- a/tests/format.test +++ b/tests/format.test @@ -492,6 +492,22 @@ for {set i 290} {$i < 400} {incr i} { append b "x" } +test format-16.1 {format %b} { + format %b 0 +} {0} + +test format-16.2 {format %b} { + format %b 1 +} {1} + +test format-16.3 {format %b} { + format %b 0xf +} {1111} + +test format-16.4 {format %b} { + format %b 1234567 +} {100101101011010000111} + # cleanup catch {unset a} catch {unset b} |