tests: Check small decode/encode

This commit is contained in:
Luke Dashjr
2014-08-18 20:22:09 +00:00
parent 9f0f04769f
commit 3e3cfa849e
3 changed files with 9 additions and 1 deletions

View File

@@ -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

3
tests/decode-small.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
hex=$(base58 -d 4 2 | xxd -p)
test x$hex = x01

3
tests/encode-small.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
b58=$(base58 1)
test x$b58 = xr