diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/binary.test | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/binary.test b/tests/binary.test index c01cdde..c6b6941 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.39 2009/02/22 17:45:21 ferrieux Exp $ +# RCS: @(#) $Id: binary.test,v 1.40 2009/12/29 01:43:23 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -2473,6 +2473,9 @@ test binary-71.9 {binary decode hex} -body { set r [binary decode hex "6"] list [string length $r] $r } -result {0 {}} +test binary-71.10 {binary decode hex} -body { + string length [binary decode hex " "] +} -result 0 test binary-72.1 {binary encode base64} -body { binary encode base64 @@ -2621,6 +2624,9 @@ test binary-73.23 {binary decode base64} -body { set r [binary decode base64 YWJj] list [string length $r] $r } -result {3 abc} +test binary-73.24 {binary decode base64} -body { + string length [binary decode base64 " "] +} -result 0 test binary-74.1 {binary encode uuencode} -body { binary encode uuencode @@ -2668,19 +2674,19 @@ test binary-75.3 {binary decode uuencode} -body { test binary-75.4 {binary decode uuencode} -body { binary decode uuencode [string repeat "86)C" 20] } -result [string repeat abc 20] -test binary-75.5 {binary encode uuencode} -body { +test binary-75.5 {binary decode uuencode} -body { binary decode uuencode "``\$\"`P0``0(#" } -result "\0\1\2\3\4\0\1\2\3" -test binary-75.6 {binary encode uuencode} -body { +test binary-75.6 {binary decode uuencode} -body { string length [binary decode uuencode {`}] } -result 0 -test binary-75.7 {binary encode uuencode} -body { +test binary-75.7 {binary decode uuencode} -body { string length [binary decode uuencode {``}] } -result 1 -test binary-75.8 {binary encode uuencode} -body { +test binary-75.8 {binary decode uuencode} -body { string length [binary decode uuencode {```}] } -result 2 -test binary-75.9 {binary encode uuencode} -body { +test binary-75.9 {binary decode uuencode} -body { string length [binary decode uuencode {````}] } -result 3 test binary-75.10 {binary decode uuencode} -body { @@ -2726,6 +2732,9 @@ test binary-75.25 {binary decode uuencode} -body { set s "04)\#z" binary decode uuencode $s } -returnCodes error -match glob -result {invalid uuencode character "z" at position 4} +test binary-75.26 {binary decode uuencode} -body { + string length [binary decode uuencode " "] +} -result 0 # cleanup ::tcltest::cleanupTests |