self-test script
This commit is contained in:
parent
5c281ad28f
commit
38fa4c71a4
|
@ -14,7 +14,7 @@ INCLUDES = $(DEPS_CFLAGS)
|
|||
|
||||
bin_PROGRAMS = minimodem
|
||||
|
||||
EXTRA_DIST = run-test
|
||||
EXTRA_DIST = run-test self-test
|
||||
|
||||
|
||||
SIMPLEAUDIO_SRC = \
|
||||
|
|
|
@ -166,7 +166,7 @@ top_builddir = @top_builddir@
|
|||
top_srcdir = @top_srcdir@
|
||||
AM_CFLAGS = -Wall -Werror
|
||||
INCLUDES = $(DEPS_CFLAGS)
|
||||
EXTRA_DIST = run-test
|
||||
EXTRA_DIST = run-test self-test
|
||||
SIMPLEAUDIO_SRC = \
|
||||
simpleaudio.h \
|
||||
simpleaudio_internal.h \
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ $# -eq 2 ] || {
|
||||
echo "usage: self-test baudmode textfile" 1>&2
|
||||
exit 1
|
||||
}
|
||||
baudmode="$1"
|
||||
textfile="$2"
|
||||
|
||||
TMPF="/tmp/minimodem-test-$$.flac"
|
||||
trap "rm -f $TMPF" 0
|
||||
|
||||
set -e
|
||||
./minimodem -T "$baudmode" $TMPF < "$textfile"
|
||||
ls -l $TMPF
|
||||
./minimodem "$baudmode" $TMPF | diff "$textfile" -
|
||||
|
Loading…
Reference in New Issue