File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -8,29 +8,30 @@ test_case() {
88 mkdir -p result
99 cp " case$1 " /* result
1010 cd " result"
11+ echo " ## CASE $1 : START ##"
1112 diff -u a.txt b.txt > " diff"
1213 if [ -f " c.txt" ] && [ -f " d.txt" ]; then diff -u c.txt d.txt >> " diff" ; fi
1314 $INTERP $SCRIPT diff
1415 if [ -f " c.txt" ] && [ -f " d.txt" ]; then
1516 if { set +e; cmp -s a.txt b.txt; } && { set +e; cmp -s c.txt d.txt; }; then
16- printf " \tCASE %s: PASS\n" " $1 "
17+ printf " ## CASE %s: PASS ## \n" " $1 "
1718 else
18- printf " \tCASE %s: FAIL\n" " $1 "
19+ printf " ## CASE %s: FAIL ## \n" " $1 "
1920 FAIL=$(( FAIL + 1 ))
2021 fi
2122 else
2223 if { set +e; cmp -s a.txt b.txt; }; then
23- printf " \tCASE %s: PASS\n" " $1 "
24+ printf " ## CASE %s: PASS ## \n" " $1 "
2425 else
25- printf " \tCASE %s: FAIL\n" " $1 "
26+ printf " ## CASE %s: FAIL ## \n" " $1 "
2627 FAIL=$(( FAIL + 1 ))
2728 fi
2829 fi
2930 cd ..
3031 rm -R result
3132}
32- echo " PATCH:"
33+ echo " ## PATCH: ## "
3334for i in $( seq -w 1 21) ; do test_case " $i " ; done
3435echo " "
35- if [ $FAIL -gt 0 ]; then echo " PATCH: $FAIL FAIL" ; exit 1; fi
36- echo " PATCH: ALL PASS"
36+ if [ $FAIL -gt 0 ]; then echo " ## PATCH: $FAIL FAIL ## " ; exit 1; fi
37+ echo " ## PATCH: ALL PASS ## "
You can’t perform that action at this time.
0 commit comments