diff --git a/Makefile.am b/Makefile.am index 348c888..a788880 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,10 +29,12 @@ TESTS = \ tests/decode-b58c-null.sh \ tests/decode-b58c-toolong.sh \ tests/decode-b58c-tooshort.sh \ + tests/decode-small.sh \ tests/decode-zero.sh \ tests/encode.sh \ tests/encode-b58c.sh \ - tests/encode-fail.sh + tests/encode-fail.sh \ + tests/encode-small.sh SH_LOG_COMPILER = /bin/sh AM_TESTS_ENVIRONMENT = PATH='$(srcdir)':"$$PATH"; export PATH; endif diff --git a/tests/decode-small.sh b/tests/decode-small.sh new file mode 100644 index 0000000..acd3bc6 --- /dev/null +++ b/tests/decode-small.sh @@ -0,0 +1,3 @@ +#!/bin/sh +hex=$(base58 -d 4 2 | xxd -p) +test x$hex = x01 diff --git a/tests/encode-small.sh b/tests/encode-small.sh new file mode 100644 index 0000000..790e95c --- /dev/null +++ b/tests/encode-small.sh @@ -0,0 +1,3 @@ +#!/bin/sh +b58=$(base58 1) +test x$b58 = xr