summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2004-07-30 00:22:46 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2004-07-30 00:22:46 +0000
commit29f52ea9db5062e8c136976fb16bbb9f889c9023 (patch)
tree461454cf899656b2d463bd925f88df6293bd0d46 /test
parentcfd9701f1ae27bcc1ad77b05563782b52f44b313 (diff)
downloadflac-29f52ea9db5062e8c136976fb16bbb9f889c9023.tar.gz
add testing of min/max possible --skip values
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_flac.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_flac.sh b/test/test_flac.sh
index f1b6c6fc..0454d937 100755
--- a/test/test_flac.sh
+++ b/test/test_flac.sh
@@ -509,6 +509,27 @@ if [ $has_ogg = "yes" ] ; then
test_skip_until aiff ogg
fi
+echo "Testing seek extremes:"
+
+run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=16 --channels=2 --blocksize=576 noise.raw || die "ERROR generating FLAC file"
+
+total_samples=`metaflac --show-total-samples noise.flac`
+[ $? = 0 ] || die "ERROR getting total sample count from noise.flac"
+
+echo -n "Testing --skip=0... "
+run_flac $wav_dopt --skip=0 -o z.wav noise.flac || die "ERROR decoding FLAC file $desc"
+echo OK
+
+for delta in 2 1 ; do
+ n=`expr $total_samples - $delta`
+ echo -n "Testing --skip=$n... "
+ run_flac $wav_dopt --skip=$n -o z.wav noise.flac || die "ERROR decoding FLAC file $desc"
+ echo OK
+done
+
+rm noise.flac z.wav
+
+
############################################################################
# test --cue
############################################################################