summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2013-08-02 06:32:24 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2013-08-02 06:32:29 +1000
commit5797009fa2beb0426d74485e7624775e2e58e1d1 (patch)
tree961b38afbe801e0bf92e7108f8a6ddff69f380ff /test
parent187e596e4cf25c3b2909197d78a238ace72ce93e (diff)
downloadflac-5797009fa2beb0426d74485e7624775e2e58e1d1.tar.gz
test/test_replaygain.sh : Prefer mawk over gawk.
The AWK script used to generate tones for this test fails with gawk version 4.0.1, but used to work for earlier versions. Use mawk instead if it exists.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_replaygain.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/test_replaygain.sh b/test/test_replaygain.sh
index 65ad529d..eeaf6d63 100755
--- a/test/test_replaygain.sh
+++ b/test/test_replaygain.sh
@@ -110,13 +110,22 @@ fi
check_flac
+
+if mawk ; then
+ AWK=mawk
+else
+ # Really hope awk is not gawk, because the following AWK script doesn't
+ # work correctly with gawk 4.0.1 but did with earlier versions.
+ AWK=awk
+ fi
+
# Replay gain tests - Test the rates which have specific filter table entries
# and verify that harmonics can be processed correctly.
tonegenerator ()
{
# When using GAWK, use --lint=posix to identify non-POSIX awk usages.
- awk -- '
+ $AWK -- '
BEGIN {
samplerate = '$1';