self-test: change arg order

This commit is contained in:
Kamal Mostafa 2012-08-11 16:25:51 -07:00
parent 8d90e839d7
commit f3a9337f8d
6 changed files with 12 additions and 11 deletions

View File

@ -2,18 +2,19 @@
MINIMODEM="${MINIMODEM-./minimodem}"
[ $# -eq 2 ] || {
echo "usage: self-test baudmode textfile" 1>&2
[ $# -ge 2 ] || {
echo "usage: self-test textfile minimodem_args" 1>&2
exit 1
}
baudmode="$1"
textfile="$2"
textfile="$1"
shift
minimodem_args="$*"
TMPF="/tmp/minimodem-test-$$.wav"
trap "rm -f $TMPF" 0
set -e
$MINIMODEM --tx -T 1 --file $TMPF "$baudmode" < "$textfile"
$MINIMODEM --tx -T 1 --file $TMPF $minimodem_args < "$textfile"
# ls -l $TMPF
$MINIMODEM --rx --file $TMPF "$baudmode" | diff "$textfile" -
$MINIMODEM --rx --file $TMPF $minimodem_args | diff "$textfile" -

View File

@ -1,2 +1,2 @@
# use fsk.c as the sample text file
exec ./self-test 1200 fsk.c
exec ./self-test fsk.c 1200

View File

@ -1 +1 @@
exec ./self-test 300 testcases/self-test-ascii.txt
exec ./self-test testcases/self-test-ascii.txt 300

View File

@ -1,2 +1,2 @@
# use self-test-baudot.txt as the sample text file
exec ./self-test rtty testcases/self-test-baudot.txt
exec ./self-test testcases/self-test-baudot.txt rtty

View File

@ -2,4 +2,4 @@
TMPF=/tmp/minimodem-test.$$
trap "rm -f $TMPF" 0
echo "KAMAL" > $TMPF
./self-test 0.5 $TMPF
./self-test $TMPF 0.5

View File

@ -1 +1 @@
exec ./self-test 12000 testcases/self-test-ascii.txt
exec ./self-test testcases/self-test-ascii.txt 12000