Mercurial > hg > sonic-annotator
comparison tests/test-helpfulflags.sh @ 0:581b1b150a4d
* copy to sonic-annotator
author | Chris Cannam |
---|---|
date | Thu, 11 Dec 2008 10:22:33 +0000 |
parents | |
children | 03a02c1f0a9f |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:581b1b150a4d |
---|---|
1 #!/bin/bash | |
2 | |
3 mypath=`dirname $0` | |
4 r=$mypath/../sonic-annotator | |
5 | |
6 testplug=vamp:vamp-example-plugins:percussiononsets | |
7 | |
8 fail() { | |
9 echo "Test failed: $1" | |
10 exit 1 | |
11 } | |
12 | |
13 $r >/dev/null 2>&1 && \ | |
14 fail "Return code 0 when run without args (should be a failure code)" | |
15 | |
16 $r 2>&1 >/dev/null | grep -q "for help" || \ | |
17 fail "Improper response when run without args" | |
18 | |
19 $r --help 2>&1 | grep -q Copy || \ | |
20 fail "Expected help not printed when run with --help" | |
21 | |
22 $r --list >/dev/null 2>&1 || \ | |
23 fail "Fails to run with --list" | |
24 | |
25 $r --list 2>/dev/null | grep -q $testplug || \ | |
26 fail "Fails to print $testplug in plugin list (if you haven't got it, install it -- it's needed for other tests)" | |
27 | |
28 $r --skeleton $testplug >/dev/null || \ | |
29 fail "Fails to run with --skeleton $testplug" | |
30 | |
31 $r -s $testplug >/dev/null || \ | |
32 fail "Fails to run with -s $testplug" | |
33 | |
34 $r --skeleton $testplug >/dev/null || \ | |
35 fail "Fails to run with --skeleton $testplug" | |
36 | |
37 $r --skeleton $testplug | rapper -i turtle - test >/dev/null 2>&1 || \ | |
38 fail "Invalid XML skeleton produced with --skeleton $testplug" | |
39 | |
40 exit 0 |