| 1 | #! /bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | # Usage: ./e2.sh <esl-seqstat> <stockholm file> |
| 4 | # Example: ./e2.sh ../miniapps/esl-seqstat ../formats/stockholm.1 |
| 5 | # |
| 6 | # This tests that % cat foo.sto | esl-seqstat - |
| 7 | # produces an error message: Format of seqfile - unrecognized. |
| 8 | # whereas % cat foo.sto | esl-seqstat --informat stockholm - |
| 9 | # succeeds |
| 10 | |
| 11 | prog=$1 |
| 12 | alifile=$2 |
| 13 | |
| 14 | output=`catscip-shell system . . cat. $alifile | $prog - 2>&1 | headscip-shell system . . head. -n 1 | grepscip-shell system . . grep. -c "^Format of seqfile - unrecognized."` |
| 15 | if testscip-shell system . . test. "$output" = 0 |
| 16 | then |
| 17 | echoscip-shell system . . echo. "FAIL" |
| 18 | exit 1 |
| 19 | fi |
| 20 | |
| 21 | output=`catscip-shell system . . cat. $alifile | $prog --informat stockholm - 2>&1` |
| 22 | if testscip-shell system . . test. $? -gt 0 |
| 23 | then |
| 24 | echoscip-shell system . . echo. "FAIL" |
| 25 | exit 1 |
| 26 | fi |
| 27 | |
| 28 | |
| 29 | echoscip-shell system . . echo. "ok" |
| 30 | exit 0 |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 |