tests: Check encoding with highest bit set
Detects j dropping below 0 going unchecked.
This bug was originally fixed in 2c6b7916b6, but due to ssize_t being a POSIX extension, we are going to check it manually.
This commit is contained in:
@@ -33,6 +33,7 @@ TESTS = \
|
||||
tests/decode-zero.sh \
|
||||
tests/encode.sh \
|
||||
tests/encode-b58c.sh \
|
||||
tests/encode-b58c-high.sh \
|
||||
tests/encode-fail.sh \
|
||||
tests/encode-small.sh
|
||||
SH_LOG_COMPILER = /bin/sh
|
||||
|
||||
3
tests/encode-b58c-high.sh
Executable file
3
tests/encode-b58c-high.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
b58=$(echo 'ff5a1fc5dd9e6f03819fca94a2d89669469667f9a0' | xxd -r -p | base58 -c)
|
||||
test x$b58 = x2mkQLxaN3Y4CwN5E9rdMWNgsXX7VS6UnfeT
|
||||
Reference in New Issue
Block a user