comparison tests/test-parse-errors/test-parse-errors.sh @ 230:d582d5662010 json-ld

Merge from default branch
author Chris Cannam
date Thu, 25 Feb 2016 12:36:08 +0000
parents 56ff594b022c
children
comparison
equal deleted inserted replaced
223:f4315a0ade89 230:d582d5662010
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