Commit fb9b344e authored by Stefan Westerfeld's avatar Stefan Westerfeld

TESTS: use audiowmark cmp --expect-matches option

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 0d4af829
......@@ -7,7 +7,7 @@ OUT_WAV=block-decoder-test-out.wav
audiowmark test-gen-noise $IN_WAV 200 44100
audiowmark_add $IN_WAV $OUT_WAV $TEST_MSG
audiowmark_cmp $OUT_WAV $TEST_MSG
audiowmark_cmp --expect-matches 5 $OUT_WAV $TEST_MSG
rm $IN_WAV $OUT_WAV
exit 0
......@@ -8,10 +8,10 @@ CUT_WAV=clip-decoder-test-out-cut.wav
audiowmark test-gen-noise $IN_WAV 30 44100
audiowmark_add $IN_WAV $OUT_WAV $TEST_MSG
audiowmark_cmp $OUT_WAV $TEST_MSG
audiowmark_cmp --expect-matches 1 $OUT_WAV $TEST_MSG
# cut 1 second 300 samples
audiowmark cut-start $OUT_WAV $CUT_WAV 44300
audiowmark_cmp $CUT_WAV $TEST_MSG
audiowmark_cmp --expect-matches 1 $CUT_WAV $TEST_MSG
rm $IN_WAV $OUT_WAV $CUT_WAV
exit 0
......@@ -7,8 +7,8 @@ OUT_WAV=pipe-test-out.wav
audiowmark test-gen-noise $IN_WAV 200 44100
cat $IN_WAV | audiowmark_add - - $TEST_MSG > $OUT_WAV || die "watermark from pipe failed"
audiowmark_cmp $OUT_WAV $TEST_MSG
cat $OUT_WAV | audiowmark_cmp - $TEST_MSG || die "watermark detection from pipe failed"
audiowmark_cmp --expect-matches 5 $OUT_WAV $TEST_MSG
cat $OUT_WAV | audiowmark_cmp --expect-matches 5 - $TEST_MSG || die "watermark detection from pipe failed"
rm $IN_WAV $OUT_WAV
exit 0
......@@ -8,9 +8,9 @@ OUT_48000_WAV=sample-rate-test-out-48000.wav
audiowmark test-gen-noise $IN_WAV 200 32000
audiowmark_add $IN_WAV $OUT_WAV $TEST_MSG
audiowmark_cmp $OUT_WAV $TEST_MSG
audiowmark_cmp --expect-matches 5 $OUT_WAV $TEST_MSG
audiowmark test-resample $OUT_WAV $OUT_48000_WAV 48000
audiowmark_cmp $OUT_48000_WAV $TEST_MSG
audiowmark_cmp --expect-matches 5 $OUT_48000_WAV $TEST_MSG
rm $IN_WAV $OUT_WAV $OUT_48000_WAV
exit 0
......@@ -10,7 +10,7 @@ audiowmark test-gen-noise $IN_WAV 200 44100
audiowmark_add $IN_WAV $OUT_WAV $TEST_MSG
# cut 20 seconds and 300 samples
audiowmark cut-start $OUT_WAV $CUT_WAV 882300
audiowmark_cmp $CUT_WAV $TEST_MSG
audiowmark_cmp --expect-matches 3 $CUT_WAV $TEST_MSG
rm $IN_WAV $OUT_WAV $CUT_WAV
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment