ref: f846b88d21c30d12ea5f51b14d22858e75ba7f53
parent: 7c42356fedc0939eac2a02572d28c77506b5470c
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Sep 16 03:29:01 EDT 2018
[tests] Use a common format in all the tests
--- a/tests/ar/execute/chktest.sh
+++ b/tests/ar/execute/chktest.sh
@@ -8,6 +8,6 @@
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
--- a/tests/as/execute/chktest.sh
+++ b/tests/as/execute/chktest.sh
@@ -7,6 +7,6 @@
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
--- a/tests/nm/execute/chktest.sh
+++ b/tests/nm/execute/chktest.sh
@@ -7,6 +7,6 @@
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
--- a/tests/scc/error/chktest.sh
+++ b/tests/scc/error/chktest.sh
@@ -11,10 +11,11 @@
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
--- a/tests/scc/execute/chktest.sh
+++ b/tests/scc/execute/chktest.sh
@@ -15,9 +15,10 @@
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