comparison tests/test-parse-errors/test-parse-errors.sh @ 248:c8e5fcddf8be

Merge
author Chris Cannam
date Fri, 18 Mar 2016 15:15:55 +0000
parents 56ff594b022c
children
comparison
equal deleted inserted replaced
247:5eadb3b687bb 248:c8e5fcddf8be
1 #!/bin/bash
2
3 . ../include.sh
4
5 infile=$audiopath/3clicks8.wav
6 tmpfile=$mypath/tmp_$$
7 trap "rm -f $tmpfile" 0
8
9 for transform in "$mypath"/inputs/* ; do
10
11 base=$(basename "$transform")
12 expected="$mypath"/expected/"$base".txt
13
14 if [ ! -f "$expected" ]; then
15 fail "Internal error: Expected file $expected not found for transform $transform"
16 fi
17
18 if $r -t "$transform" -w csv --csv-one-file /dev/null "$infile" 2>"$tmpfile" ; then
19 fail "Erroneously succeeds in running bogus transform $transform"
20 fi
21
22 cat "$expected" | while read line; do
23 if ! fgrep -q "$line" "$tmpfile" ; then
24 fail "Expected output text \"$line\" not found in diagnostic output for transform $base"
25 fi
26 done
27
28 done
29