| 1 |
#!/bin/sh |
| 2 |
set -e |
| 3 |
set -x |
| 4 |
sweep="$srcdir/src/tests/sweep.mp3" |
| 5 |
sweepsweep="src/tests/sweepsweep.mp3" |
| 6 |
stripsweep="src/tests/stripsweep.mp3" |
| 7 |
|
| 8 |
echo "Test successful decoding as such:" |
| 9 |
c1=$(src/tests/decode_fixed "$sweep" | wc -c) |
| 10 |
|
| 11 |
echo "Test that track is decoded only once:" |
| 12 |
cat "$sweep" "$sweep" > "$sweepsweep" |
| 13 |
c2=$(src/tests/decode_fixed "$sweepsweep" | wc -c) |
| 14 |
test "$c1" = "$c2" |
| 15 |
|
| 16 |
echo "Test that stripped track is decoded twice:" |
| 17 |
src/mpg123-strip -n < "$sweepsweep" > "$stripsweep" |
| 18 |
c3=$(src/tests/decode_fixed "$stripsweep" | wc -c) |
| 19 |
# Needs to be even larger as gapless info vanished. |
| 20 |
test "$c3" -gt "$(($c2*2))" |
| 21 |
|
| 22 |
echo PASS |