diff --git a/Makefile.am b/Makefile.am index 021db1a..0bcc061 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = src -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = $(SUBDIRS) test EXTRA_DIST = bootstrap AUTHORS AUTOMAKE_OPTIONS = foreign dist-bzip2 diff --git a/configure.ac b/configure.ac index d901fa9..dffd16c 100644 --- a/configure.ac +++ b/configure.ac @@ -43,5 +43,6 @@ CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-protot AC_OUTPUT([ Makefile src/Makefile + test/Makefile ]) diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..9769079 --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,3 @@ + +EXTRA_DIST = testsuite.sh + diff --git a/test/testsuite.sh b/test/testsuite.sh new file mode 100755 index 0000000..0456c04 --- /dev/null +++ b/test/testsuite.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +ZZUF="$(dirname "$0")/../src/zzuf" + +echo "Testing zzuf on itself:" +MD5_CAT=$($ZZUF cat $ZZUF | md5sum) +echo " - cat: $MD5_CAT" +MD5_DD_1=$($ZZUF dd if=$ZZUF bs=1 2>/dev/null | md5sum) +echo " - dd(bs=1): $MD5_DD_1" +MD5_DD_1024=$($ZZUF dd if=$ZZUF bs=1024 2>/dev/null | md5sum) +echo " - dd(bs=1024): $MD5_DD_1024" +