From af0ce8d8361ab6e0da7a35abc770dda18ee1cd55 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 16 May 2016 21:44:36 +1200 Subject: Quote bash variables Style adjustments continue --- test/test.sh | 12 +++++++----- 1 file 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 -- cgit v1.1