Test suite using base58 CLI tool
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,11 +12,14 @@ config.*
|
||||
*.lo
|
||||
autom4te.cache
|
||||
ar-lib
|
||||
test-driver
|
||||
aclocal.m4
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
||||
*.log
|
||||
.libs
|
||||
ii
|
||||
*.tar*
|
||||
base58
|
||||
tests/*.trs
|
||||
|
||||
12
Makefile.am
12
Makefile.am
@@ -20,3 +20,15 @@ bin_PROGRAMS = base58
|
||||
base58_SOURCES = clitool.c
|
||||
base58_CFLAGS = $(LIBGCRYPT_CFLAGS)
|
||||
base58_LDADD = libbase58.la $(LIBGCRYPT_LIBS)
|
||||
|
||||
TESTS = \
|
||||
tests/decode.sh \
|
||||
tests/decode-b58c.sh \
|
||||
tests/decode-b58c-fail.sh \
|
||||
tests/decode-b58c-null.sh \
|
||||
tests/encode.sh \
|
||||
tests/encode-b58c.sh \
|
||||
tests/encode-fail.sh
|
||||
TEST_EXTENSIONS = .sh
|
||||
SH_LOG_COMPILER = /bin/sh
|
||||
AM_TESTS_ENVIRONMENT = PATH='$(srcdir)':"$$PATH"; export PATH;
|
||||
|
||||
2
tests/decode-b58c-fail.sh
Normal file
2
tests/decode-b58c-fail.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
! base58 -d 25 -c 19DXstMaV43WpYg4ceREiiTv2UntmoiA9a >/dev/null
|
||||
3
tests/decode-b58c-null.sh
Normal file
3
tests/decode-b58c-null.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
hex=$(base58 -d 25 -c 19DXstMaV43WpYg4ceREiiTv2UntmoiA9a | xxd -p)
|
||||
test x$hex = x
|
||||
3
tests/decode-b58c.sh
Normal file
3
tests/decode-b58c.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
hex=$(base58 -d 25 -c 19DXstMaV43WpYg4ceREiiTv2UntmoiA9j | xxd -p)
|
||||
test x$hex != x005a1fc5dd9e6f03819fca94a2d89669469667f9a1
|
||||
3
tests/decode.sh
Normal file
3
tests/decode.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
hex=$(base58 -d 25 19DXstMaV43WpYg4ceREiiTv2UntmoiA9j | xxd -p)
|
||||
test x$hex != x005a1fc5dd9e6f03819fca94a2d89669469667f9a1
|
||||
3
tests/encode-b58c.sh
Normal file
3
tests/encode-b58c.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
b58=$(echo '005a1fc5dd9e6f03819fca94a2d89669469667f9a0' | xxd -r -p | base58 -c)
|
||||
test x$b58 = x19DXstMaV43WpYg4ceREiiTv2UntmoiA9j
|
||||
3
tests/encode-fail.sh
Normal file
3
tests/encode-fail.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
b58=$(echo '005a1fc5dd9e6f03819fca94a2d89669469667f9a174655946' | xxd -r -p | base58)
|
||||
test x$b58 != x19DXstMaV43WpYg4ceREiiTv2UntmoiA9j
|
||||
3
tests/encode.sh
Executable file
3
tests/encode.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
b58=$(echo '005a1fc5dd9e6f03819fca94a2d89669469667f9a074655946' | xxd -r -p | base58)
|
||||
test x$b58 = x19DXstMaV43WpYg4ceREiiTv2UntmoiA9j
|
||||
Reference in New Issue
Block a user