summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartijn van Beurden <mvanb1@gmail.com>2022-01-11 09:16:12 +0100
committerMartijn van Beurden <mvanb1@gmail.com>2022-05-02 07:59:01 +0200
commitd9554fb7c9fd850a6754f8bdb586338dc574fcd6 (patch)
treed50206dd2de2a6f4abf0b67a1ef02f0af400edc8 /test
parentb5f4a1535c19e476b4987cb587e089288dc1bf70 (diff)
downloadflac-d9554fb7c9fd850a6754f8bdb586338dc574fcd6.tar.gz
Add --limit-min-bitrate to flac and add test for it
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_flac.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/test_flac.sh b/test/test_flac.sh
index 369d23b4..75e995d6 100755
--- a/test/test_flac.sh
+++ b/test/test_flac.sh
@@ -1249,6 +1249,25 @@ flac2flac input-SCVA.flac case04e "--no-padding -S 5x"
# case 04f: on file with SEEKTABLE block and size-changing option specified, drop existing SEEKTABLE, new SEEKTABLE with default points
#(already covered by case03c)
+############################################################################
+# test limiting minimum bitrate
+############################################################################
+
+echo $ECHO_N "Testing --limit-min-bitrate" $ECHO_C
+
+run_flac -f -o out.flac --no-padding --no-seektable --limit-min-bitrate "$testdatadir/input-VA.flac"
+size=$(wc -c < out.flac)
+
+if [ "$size" -lt "1022" ]; then
+ die "ERROR: filesize of flac file encoded with --limit-min-bitrate is smaller than expected"
+fi
+
+echo OK
+
+############################################################################
+# test overflow of total samples field in STREAMINFO
+############################################################################
+
test_total_samples_overflow ()
{
total_samples=$1
@@ -1271,7 +1290,6 @@ if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
test_total_samples_overflow 68719476737 0
fi
-
rm -f out.flac out.meta out1.meta
#@@@ when metaflac handles ogg flac, duplicate flac2flac tests here