annotate tests/test-parse-errors/test-parse-errors.sh @ 281:c8162c2992f8 piper-nopiper

Further test updates. The AF results should match to 3dp with different MAD builds. The onset position results hopefully should match completely now prefix sorted, let's see.
author Chris Cannam
date Tue, 29 Nov 2016 17:14:21 +0000
parents 56ff594b022c
children
rev   line source
Chris@228 1 #!/bin/bash
Chris@228 2
Chris@228 3 . ../include.sh
Chris@228 4
Chris@228 5 infile=$audiopath/3clicks8.wav
Chris@228 6 tmpfile=$mypath/tmp_$$
Chris@228 7 trap "rm -f $tmpfile" 0
Chris@228 8
Chris@228 9 for transform in "$mypath"/inputs/* ; do
Chris@228 10
Chris@228 11 base=$(basename "$transform")
Chris@228 12 expected="$mypath"/expected/"$base".txt
Chris@228 13
Chris@228 14 if [ ! -f "$expected" ]; then
Chris@228 15 fail "Internal error: Expected file $expected not found for transform $transform"
Chris@228 16 fi
Chris@228 17
Chris@228 18 if $r -t "$transform" -w csv --csv-one-file /dev/null "$infile" 2>"$tmpfile" ; then
Chris@228 19 fail "Erroneously succeeds in running bogus transform $transform"
Chris@228 20 fi
Chris@228 21
Chris@228 22 cat "$expected" | while read line; do
Chris@228 23 if ! fgrep -q "$line" "$tmpfile" ; then
Chris@228 24 fail "Expected output text \"$line\" not found in diagnostic output for transform $base"
Chris@228 25 fi
Chris@228 26 done
Chris@228 27
Chris@228 28 done
Chris@228 29