testing framework and first test

pull/39/head
Christian Krause 9 years ago
parent 36895b9550
commit 0c933db8a8

6
.gitignore vendored

@ -18,6 +18,7 @@ Makefile.in
/install-sh
/ltmain.sh
/missing
/test-driver
# created by configure
@ -38,3 +39,8 @@ Makefile
pixz
pixz.1
*.tar.*
# created by make check
/test/*.log
/test/*.trs

@ -1,5 +1,5 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src
SUBDIRS = src test
EXTRA_DIST = LICENSE m4 NEWS README test.sh TODO

@ -46,5 +46,6 @@ AC_FUNC_STRTOD
AC_CHECK_FUNCS([memchr memmove memset strtol])
AC_CONFIG_FILES([Makefile
src/Makefile])
src/Makefile
test/Makefile])
AC_OUTPUT

@ -0,0 +1,7 @@
TESTS = \
single-file-round-trip.sh
EXTRA_DIST = $(TESTS)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = bash

@ -0,0 +1,14 @@
#!/bin/bash
PIXZ=../src/pixz
INPUT=$(basename $0)
COMPRESSED=$INPUT.xz
UNCOMPRESSED=$INPUT.extracted
trap "rm -f $COMPRESSED $UNCOMPRESSED" EXIT
$PIXZ $INPUT $COMPRESSED
$PIXZ -d $COMPRESSED $UNCOMPRESSED
[[ $(cat $INPUT | md5sum) = $(cat $UNCOMPRESSED | md5sum) ]] || exit 1
Loading…
Cancel
Save