comparison tests/test-transforms-basic.sh @ 28:102bb1729184 sonic-annotator-0.4

* Test fixes for cases where the behaviour has actually been fixed for 0.4 * Emphasise this change in CHANGELOG
author Chris Cannam
date Fri, 25 Sep 2009 12:00:58 +0000
parents 03a02c1f0a9f
children 94d988cef54e
comparison
equal deleted inserted replaced
27:9fef62a3696d 28:102bb1729184
8 tmpfile1=$mypath/tmp_1_$$ 8 tmpfile1=$mypath/tmp_1_$$
9 tmpfile2=$mypath/tmp_2_$$ 9 tmpfile2=$mypath/tmp_2_$$
10 10
11 trap "rm -f $tmpfile1 $tmpfile2" 0 11 trap "rm -f $tmpfile1 $tmpfile2" 0
12 12
13 fail() { 13 . test-include.sh
14 echo "Test failed: $1"
15 exit 1
16 }
17 14
18 $r --skeleton $testplug > $tmpfile1 2>/dev/null || \ 15 $r --skeleton $testplug > $tmpfile1 2>/dev/null || \
19 fail "Fails to run with --skeleton $testplug" 16 fail "Fails to run with --skeleton $testplug"
20 17
21 $r -t $tmpfile1 -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \ 18 $r -t $tmpfile1 -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
22 fail "Fails to run with -t $tmpfile -w csv --csv-stdout $infile" 19 fail "Fails to run with -t $tmpfile -w csv --csv-stdout $infile"
23 20
24 cmp -s $tmpfile2 $mypath/expected/transforms-basic-skeleton-1.csv || \ 21 csvcompare $tmpfile2 $mypath/expected/transforms-basic-skeleton-1.csv || \
25 fail "Output mismatch for transforms-basic-skeleton-1.csv" 22 fail "Output mismatch for transforms-basic-skeleton-1.csv"
26 23
27 for suffix in \ 24 for suffix in \
28 -no-parameters-default-output \ 25 -no-parameters-default-output \
29 -no-parameters \ 26 -no-parameters \
45 fail "Internal error: no expected output file for suffix $suffix" 42 fail "Internal error: no expected output file for suffix $suffix"
46 43
47 $r -t $transform -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \ 44 $r -t $transform -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
48 fail "Fails to run transform $transform" 45 fail "Fails to run transform $transform"
49 46
50 cmp -s $tmpfile2 $expected || \ 47 csvcompare $tmpfile2 $expected || \
51 fail "Output mismatch for transform $transform" 48 fail "Output mismatch for transform $transform"
52 done 49 done
53 done 50 done
54 51
55 exit 0 52 exit 0