[hackers] [scc] [tests] Don't quote what doesn't need to be quoted || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 22 Mar 2017 08:47:39 +0100 (CET)

commit 2ebe4abf488d6041aa285d6a489528b7c1ca1a73
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Mar 22 08:23:35 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -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
Received on Wed Mar 22 2017 - 08:47:39 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 22 2017 - 08:48:16 CET