scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 295cb3faba48a9d0017647ad7cb65fd6722bf032
parent d0f40db4e66fcfca1fab28192867511be509ffe4
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 16 Sep 2018 07:29:01 +0100

[tests] Use a common format in all the tests

Diffstat:
Mtests/ar/execute/chktest.sh | 2+-
Mtests/as/execute/chktest.sh | 2+-
Mtests/nm/execute/chktest.sh | 2+-
Mtests/scc/error/chktest.sh | 3++-
Mtests/scc/execute/chktest.sh | 3++-
5 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/ar/execute/chktest.sh b/tests/ar/execute/chktest.sh @@ -8,6 +8,6 @@ rm -rf file* for i in *-*.sh do printf "Test: %s\n\n" $i >> test.log - ./$i >> test.log 2>&1 && printf '[PASS]: ' || printf '[FAIL]: ' + ./$i >> test.log 2>&1 && printf '[PASS]\t' || printf '[FAIL]\t' echo "$i" done diff --git a/tests/as/execute/chktest.sh b/tests/as/execute/chktest.sh @@ -7,6 +7,6 @@ for i in *.s do cpu="${i%.s}" printf "Test: %s\n\n" $cpu >> test.log - ./test.sh $cpu && printf '[PASS]: ' || printf '[FAIL]: ' + ./test.sh $cpu && printf '[PASS]\t' || printf '[FAIL]\t' printf 'testing cpu=%s\n' "$cpu" done diff --git a/tests/nm/execute/chktest.sh b/tests/nm/execute/chktest.sh @@ -7,6 +7,6 @@ rm -f test.log for i in *-*.sh do printf "Test: %s\n\n" $i >> test.log - ./$i >> test.log 2>&1 && printf '[PASS]: ' || printf '[FAIL]: ' + ./$i >> test.log 2>&1 && printf '[PASS]\t' || printf '[FAIL]\t' echo "$i" done diff --git a/tests/scc/error/chktest.sh b/tests/scc/error/chktest.sh @@ -11,10 +11,11 @@ rm -f test.log while read i state do echo $i >> test.log + state=${state:-"\t"} scc $CFLAGS -w -c $i 2> $err echo "/^PATTERN/+;/^\./-w $chk" | ed -s $i diff -c $chk $err >> test.log && printf '[PASS]' || echo '[FAIL]' - printf "%s: %s\n" "$state" "$i" + printf "%s\t%s\n" "$state" "$i" rm -f *.o done < $file diff --git a/tests/scc/execute/chktest.sh b/tests/scc/execute/chktest.sh @@ -15,9 +15,10 @@ export SYS FORMAT ABI ARCH while read i state do echo $i >>test.log + state=${state:-"\t"} rm -f a.out (scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>>test.log && printf '[PASS]' || printf '[FAIL]' - printf '%s: %s\n' "$state" "$i" + printf '%s\t%s\n' "$state" "$i" done < $file