summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-09-18 15:50:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-09-18 15:50:23 (GMT)
commita55cf1edad4209ab3de602ff4c4a93abb25fce1c (patch)
tree48529fff5ad931726fa1c1faf628b327c84c0da4 /tests
parentfaa2dd58c7da0145ca7d1fda1bed3d8de3514db0 (diff)
downloadtcl-a55cf1edad4209ab3de602ff4c4a93abb25fce1c.zip
tcl-a55cf1edad4209ab3de602ff4c4a93abb25fce1c.tar.gz
tcl-a55cf1edad4209ab3de602ff4c4a93abb25fce1c.tar.bz2
Allow larger values for "binary encode base64 -maxlen". Add some more testcases
Diffstat (limited to 'tests')
-rw-r--r--tests/binary.test6
-rw-r--r--tests/format.test6
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/binary.test b/tests/binary.test
index 9a309e0..03ef846 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -2710,6 +2710,12 @@ test binary-72.28 {binary encode base64} -body {
test binary-72.29 {binary encode base64} {
string length [binary encode base64 -maxlen 3 -wrapchar \xCA abc]
} 5
+test binary-72.30 {binary encode base64} {
+ string length [binary encode base64 -maxlen 4294967296 abc]
+} 4
+test binary-72.31 {binary encode base64} -body {
+ string length [binary encode base64 -maxlen 18446744073709551616 abc]
+} -returnCodes 1 -result {integer value too large to represent}
test binary-73.1 {binary decode base64} -body {
binary decode base64
diff --git a/tests/format.test b/tests/format.test
index c5053e8..08490d2 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -462,6 +462,12 @@ test format-11.11 {XPG3 %$n specifiers} {
test format-11.12 {XPG3 %$n specifiers} {
list [catch {format {%2$*d} 4 5 6} msg] $msg
} {0 { 6}}
+test format-11.13 {XPG3 %$n specifiers} {
+ format {%2$.*s %4$d} 1 -4294967298 abcdefghijklmnop 44
+} { 44}
+test format-11.14 {XPG3 %$n specifiers} {
+ format {%2$.*s %4$d} 1 4294967298 abcdefghijklmnop 44
+} {abcdefghijklmnop 44}
test format-12.1 {negative width specifiers} {
format "%*d" -47 25