shithub: mp3dec

Download patch

ref: 75cacfc27afd3bd0263e4104d14d7eca2b101dd9
parent: 2b9a0237547ca5f6f98e28a850237cc68f560f7a
author: lieff <lieff@users.noreply.github.com>
date: Mon Feb 24 14:13:09 EST 2020

test: improve coverage

--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -55,6 +55,13 @@
 [[ "$(./minimp3 -m 8 -e 4 vectors/l3-sin1k0db.bit)" != "error: mp3dec_ex_open()=-3 failed" ]] && echo fail && exit 1 || echo pass
 [[ "$(./minimp3 -m 8 -e 5 vectors/l3-sin1k0db.bit)" != "error: mp3dec_ex_read() readed less than expected, last_error=-5" ]] && echo fail && exit 1 || echo pass
 
+[[ "$(./minimp3 -m 8 -s 2304 -e 5 vectors/l3-sin1k0db.bit)" != "error: mp3dec_ex_seek()=-3 failed" ]] && echo fail && exit 1 || echo pass
+[[ "$(./minimp3 -m 8 -s 2304 -e 6 vectors/l3-sin1k0db.bit)" != "error: mp3dec_ex_seek()=-3 failed" ]] && echo fail && exit 1 || echo pass
+[[ "$(./minimp3 -m 8 -s 2304 -e 7 vectors/l3-sin1k0db.bit)" != "error: mp3dec_ex_seek()=-3 failed" ]] && echo fail && exit 1 || echo pass
+[[ "$(./minimp3 -m 8 -s 2304 -e 8 vectors/l3-sin1k0db.bit)" != "error: mp3dec_ex_seek()=-3 failed" ]] && echo fail && exit 1 || echo pass
+[[ "$(./minimp3 -m 8 -s 2304 -e 9 vectors/l3-sin1k0db.bit)" != "error: mp3dec_ex_seek()=-3 failed" ]] && echo fail && exit 1 || echo pass
+[[ "$(./minimp3 -m 8 -s 2304 -e 12 vectors/l3-sin1k0db.bit)" != "error: mp3dec_ex_seek()=-3 failed" ]] && echo fail && exit 1 || echo pass
+
 [[ "$(./minimp3 vectors/l3-nonstandard-id3v2-only.bit vectors/l3-nonstandard-id3v2-only.pcm)" != "rate=0 samples=0 max_diff=0 PSNR=99.000000" ]] && echo fail && exit 1 || echo pass
 [[ "$(./minimp3 -m 3 vectors/l3-nonstandard-id3v2-only.bit vectors/l3-nonstandard-id3v2-only.pcm)" != "rate=0 samples=0 max_diff=0 PSNR=99.000000" ]] && echo fail && exit 1 || echo pass