Skip to content

Commit

Permalink
use printf ansi colours in POSIX manner, from Simon Ruderich
Browse files Browse the repository at this point in the history
  • Loading branch information
vext01 committed Feb 5, 2012
1 parent 3bc9db5 commit 932cb93
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ run_test() {
eval ${cmd}
code=$?
if [ ${code} -eq 47 ]; then
printf "\x1b[31m"
printf "\033[31m"
echo "FAIL (Valgrind error)"
printf "\x1b[0m"
printf "\033[0m"
cat ${val}
elif [ ! ${code} -eq 0 ]; then
printf "\x1b[31m"
printf "\033[31m"
echo "FAIL (Radare2 crashed?)"
printf "\x1b[0m"
printf "\033[0m"
elif [ "`cat $out`" = "${EXPECT}" ]; then
printf "\x1b[32m"
printf "\033[32m"
echo "SUCCESS"
printf "\x1b[0m"
printf "\033[0m"
else
printf "\x1b[31m"
printf "\033[31m"
echo "FAIL (Unexpected outcome)"
printf "\x1b[0m"
printf "\033[0m"
diff -u ${exp} ${out}
fi
rm -f ${out} ${val} ${rad} ${exp}
Expand Down

0 comments on commit 932cb93

Please sign in to comment.