shithub: scc

Download patch

ref: 994ab1e07787574e639eeb35e6da2a33a1e53bc2
parent: dafcc1466cedda9de51c749bdfb04e6c58429765
author: Quentin Rameau <quinq@fifth.space>
date: Sat Mar 11 07:05:54 EST 2017

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

--- a/tests/error/chktest.sh
+++ b/tests/error/chktest.sh
@@ -11,11 +11,11 @@
 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