commit 2ebe4abf488d6041aa285d6a489528b7c1ca1a73
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Wed Mar 22 08:23:35 2017 +0100
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Wed Mar 22 08:47:30 2017 +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.

diff --git a/tests/error/chktest.sh b/tests/error/chktest.sh
index c215609..415fc75 100755
--- 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

Reply via email to