summaryrefslogtreecommitdiff
path: root/test/test_seeking.sh
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2022-05-18 12:27:19 -0700
committerGitHub <noreply@github.com>2022-05-18 21:27:19 +0200
commit2b4ba6013e7f5bda9bb581f0aa8ed1963452374a (patch)
treed7973e1a935cb9b61716ef99e81d0ec86a53c0c0 /test/test_seeking.sh
parentf180900b955d5ec042a68aff05b5055a4542eb79 (diff)
downloadflac-2b4ba6013e7f5bda9bb581f0aa8ed1963452374a.tar.gz
tests: Run through shellcheck (#134)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'test/test_seeking.sh')
-rwxr-xr-xtest/test_seeking.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_seeking.sh b/test/test_seeking.sh
index 316d3db3..31907704 100755
--- a/test/test_seeking.sh
+++ b/test/test_seeking.sh
@@ -26,7 +26,7 @@ PATH=../src/test_seeking:$PATH
PATH=../src/test_streams:$PATH
PATH=../objs/$BUILD/bin:$PATH
-if [ x"$FLAC__TEST_LEVEL" = x ] ; then
+if [ -z "$FLAC__TEST_LEVEL" ] ; then
FLAC__TEST_LEVEL=1
fi
@@ -35,7 +35,7 @@ metaflac${EXE} --help 1>/dev/null 2>/dev/null || die "ERROR can't find metaflac
run_flac ()
{
- if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
+ if [ "$FLAC__TEST_WITH_VALGRIND" = yes ] ; then
echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=50 flac $*" >>test_seeking.valgrind.log
valgrind --leak-check=yes --show-reachable=yes --num-callers=50 --log-fd=4 flac${EXE} --no-error-on-compression-fail $* 4>>test_seeking.valgrind.log
else
@@ -45,7 +45,7 @@ run_flac ()
run_metaflac ()
{
- if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
+ if [ "$FLAC__TEST_WITH_VALGRIND" = yes ] ; then
echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=50 metaflac $*" >>test_seeking.valgrind.log
valgrind --leak-check=yes --show-reachable=yes --num-callers=50 --log-fd=4 metaflac${EXE} $* 4>>test_seeking.valgrind.log
else
@@ -55,7 +55,7 @@ run_metaflac ()
run_test_seeking ()
{
- if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
+ if [ "$FLAC__TEST_WITH_VALGRIND" = yes ] ; then
echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=50 test_seeking $*" >>test_seeking.valgrind.log
valgrind --leak-check=yes --show-reachable=yes --num-callers=50 --log-fd=4 test_seeking $* 4>>test_seeking.valgrind.log
else
@@ -82,8 +82,8 @@ run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed
run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=8 --channels=1 --blocksize=576 -S10x --output-name=tiny-s.flac noise8m32.raw || die "ERROR generating FLAC file"
run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=16 --channels=2 --blocksize=576 -S10x --output-name=small-s.flac noise.raw || die "ERROR generating FLAC file"
-tiny_samples=`metaflac${EXE} --show-total-samples tiny.flac`
-small_samples=`metaflac${EXE} --show-total-samples small.flac`
+tiny_samples="$(metaflac${EXE} --show-total-samples tiny.flac)"
+small_samples="$(metaflac${EXE} --show-total-samples small.flac)"
tiny_seek_count=100
if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then