mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: basenc: ensure --base58 decodes input of more than 1024 digits
Reported at https://github.com/uutils/coreutils/issues/15776 * tests/basenc/large-input.sh: Add a base58 round trip. Link: https://github.com/coreutils/coreutils/pull/440
This commit is contained in:
1 parent
b99b178bf6
commit
ee4ee881be
1 file changed
+7
@@ -24,4 +24,11 @@ truncate -s20MiB file.zeros || framework_failure_
|
||||
|
||||
test $(basenc --base58 file.zeros | wc -c) = 21247462 || fail=1
|
||||
|
||||
# Ensure base58 input of more than 1024 digits is decoded as one number.
|
||||
seq 300 > nums || framework_failure_
|
||||
basenc --base58 -w0 nums > nums.b58 || fail=1
|
||||
test $(wc -c < nums.b58) -gt 1024 || framework_failure_
|
||||
basenc --base58 -d nums.b58 > back || fail=1
|
||||
compare nums back || fail=1
|
||||
|
||||
Exit $fail
|
||||
Reference in new issue
Block a user