Commit 450572f6 authored by Josh Coalson's avatar Josh Coalson
Browse files

add test_seeking runs for native FLAC files with total_samples=0 in the STREAMINFO

parent 7b3808bf
......@@ -34,11 +34,13 @@ LD_LIBRARY_PATH=../src/libOggFLAC/.libs:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=../src/flac:$PATH
PATH=../src/metaflac:$PATH
PATH=../src/test_seeking:$PATH
PATH=../src/test_streams:$PATH
PATH=../obj/$BUILD/bin:$PATH
flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
metaflac --help 1>/dev/null 2>/dev/null || die "ERROR can't find metaflac executable"
run_flac ()
{
......@@ -49,6 +51,15 @@ run_flac ()
fi
}
run_metaflac ()
{
if [ x"$FLAC__VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_seeking.valgrind.log
else
metaflac $*
fi
}
run_test_seeking ()
{
if [ x"$FLAC__VALGRIND" = xyes ] ; then
......@@ -81,6 +92,21 @@ if run_test_seeking small.flac 1000 ; then : ; else
die "ERROR: during test_seeking"
fi
echo "removing sample count from tiny.flac and small.flac:"
if run_metaflac --no-filename --set-total-samples=0 tiny.flac small.flac ; then : ; else
die "ERROR: during metaflac"
fi
echo "testing tiny.flac with total_samples=0:"
if run_test_seeking tiny.flac 100 ; then : ; else
die "ERROR: during test_seeking"
fi
echo "testing small.flac with total_samples=0:"
if run_test_seeking small.flac 1000 ; then : ; else
die "ERROR: during test_seeking"
fi
echo "testing tiny.ogg:"
if run_test_seeking tiny.ogg 100 ; then : ; else
die "ERROR: during test_seeking"
......
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