diff --git a/Makefile.am b/Makefile.am index f870182..8710d74 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,6 +34,7 @@ TESTS = \ tests/encode.sh \ tests/encode-b58c.sh \ tests/encode-fail.sh \ + tests/encode-neg-index.sh \ tests/encode-small.sh SH_LOG_COMPILER = /bin/sh AM_TESTS_ENVIRONMENT = PATH='$(srcdir)':"$$PATH"; export PATH; diff --git a/tests/encode-neg-index.sh b/tests/encode-neg-index.sh new file mode 100755 index 0000000..79622c2 --- /dev/null +++ b/tests/encode-neg-index.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# This input causes the loop iteration counter to go negative +b58=$(echo '00CEF022FA' | xxd -r -p | base58) +test x$b58 = x16Ho7Hs