commit 2ebe4abf488d6041aa285d6a489528b7c1ca1a73
parent 5b0a7f2d9d0a0a08a898e3937c780c25be43c032
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 22 Mar 2017 08:23:35 +0100
[tests] Don't quote what doesn't need to be quoted
Quoting $chk was passing the file name "/tmp/something" to
diff, instead of the correct /tmp/something. Quotoing $chk was
totally unneded because it is a name generated by the
own script, so it is known to be correct. In the same way
$i is totally controlled by scc, so it is known to be correct.
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/error/chktest.sh b/tests/error/chktest.sh
@@ -11,11 +11,10 @@ rm -f test.log
while read i state
do
echo $i >> test.log
- printf "%s\t" "$i"
- printf "%s" "$state"
+ printf "%s\t%s" $i $state
- scc $CFLAGS -w -c "$i" 2> $err
- echo "/^PATTERN/+;/^\./-w \"$chk\"" | ed -s "$i"
- diff -c "$chk" "$err" >> test.log && echo [OK] || echo [FAILED]
+ scc $CFLAGS -w -c $i 2> $err
+ echo "/^PATTERN/+;/^\./-w $chk" | ed -s $i
+ diff -c $chk $err >> test.log && echo [OK] || echo [FAILED]
rm -f *.o
done