[hackers] [scc] [tests] Write file directly with ed in chktests.sh || Quentin Rameau

From: <git_AT_suckless.org>
Date: Fri, 17 Mar 2017 08:50:01 +0100 (CET)

commit b5225423a6f068c95a96c56690b5fb2ecf692df3
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sat Mar 11 12:05:54 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri Mar 17 08:47:03 2017 +0100

    [tests] Write file directly with ed in chktests.sh

diff --git a/tests/error/chktest.sh b/tests/error/chktest.sh
index b19b5b7..c215609 100755
--- a/tests/error/chktest.sh
+++ b/tests/error/chktest.sh
_AT_@ -11,11 +11,11 @@ rm -f test.log
 while read i state
 do
         echo $i >> test.log
- printf "%s\t" $i
- printf "%s" $state
+ printf "%s\t" "$i"
+ printf "%s" "$state"
 
         scc $CFLAGS -w -c "$i" 2> $err
- echo '/^PATTERN/+;/^\./-p' | ed -s $i > $chk
- diff -c $chk $err >> test.log && echo [OK] || echo [FAILED]
+ echo "/^PATTERN/+;/^\./-w \"$chk\"" | ed -s "$i"
+ diff -c "$chk" "$err" >> test.log && echo [OK] || echo [FAILED]
         rm -f *.o
 done
Received on Fri Mar 17 2017 - 08:50:01 CET

This archive was generated by hypermail 2.3.0 : Fri Mar 17 2017 - 09:01:02 CET