Skip to content

Commit

Permalink
diff 를 보여주도록 테스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Mar 29, 2015
1 parent d284c91 commit 1de473c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ for d in $ds; do
echo -n " test $fbase"...
if [ -e "$d/$fbase".out ]; then
if [ -e "$d/$fbase".in ]; then
out=`$AHEUI $f < $d/$fbase.in`
"$AHEUI" "$f" < "$d/$fbase.in" > .test.tmp
else
out=`$AHEUI $f`
"$AHEUI" "$f" > .test.tmp
fi
exitcode=$?
out=`cat .test.tmp`
if [ -e "$d/$fbase".exitcode ]; then
exitcodetest=1
exitcodedata=`cat "$d/$fbase".exitcode`
Expand Down Expand Up @@ -53,7 +54,10 @@ for d in $ds; do
echo -e "\x1B[91mfail!\x1B[0m"
echo -e " \x1B[92mexpected\x1B[0m $outdata"
echo -e " \x1B[91mactual\x1B[0m $out"
echo -e "diff from actual to expected"
diff -u .test.tmp "$d/$fbase.out"
fi
rm .test.tmp
else
echo -e '\x1B[93moutput not found\x1B[0m'
fi
Expand Down

0 comments on commit 1de473c

Please sign in to comment.