aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-05-16 21:44:36 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-05-16 21:44:42 +1200
commitaf0ce8d8361ab6e0da7a35abc770dda18ee1cd55 (patch)
tree4ad31e36ffe88794333b535ede632982353a57e1
parentbb55d36f2924fb93a67c89adf0f8316f7d47a1ba (diff)
downloadpgm-interlace-af0ce8d8361ab6e0da7a35abc770dda18ee1cd55.tar.xz
Quote bash variables
Style adjustments continue
-rwxr-xr-xtest/test.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/test.sh b/test/test.sh
index 4c15e34..6ca0d41 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -25,13 +25,15 @@ export EXECUTABLE="$PWD/../pgm-interlace"
for i in {pass,error,xfail}/*.sh ; do
test_type=$(dirname $i)
pushd $test_type > /dev/null
- name=$(basename ${i/.sh/})
+
+ name=$(basename "${i/.sh/}")
expected="$name.pgm.expected"
out="$name.pgm.out"
- ./$(basename $i) 2> $name.stderr.log
+ log="$name.stderr.log"
+ ./$(basename $i) 2> "$log"
result=$?
- if [ -f $expected ] ; then
- diff $expected $out
+ if [ -f "$expected" ] ; then
+ diff "$expected" "$out"
result=$?
fi
case $test_type in
@@ -62,6 +64,6 @@ for i in {pass,error,xfail}/*.sh ; do
;;
esac
- rm -f $out $name.stderr.log
+ rm -f "$out" "$log"
popd > /dev/null
done