1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-25 20:04:03 +02:00

prod/Common: try to obtain more consistent handling of \033 in echo

- Common (g_echo): wrapper for /bin/echo -e
- Common (pass, fail, todo): use g_echo instead of regular "echo" for
  strings containing escape sequences
This commit is contained in:
Werner Almesberger 2011-06-06 21:55:47 -03:00
parent 90ee726285
commit 6e3edf3d2e

View File

@ -51,6 +51,12 @@ step()
##### Test result ###########################################################
g_echo()
{
/bin/echo -e "$@"
}
finish()
{
echo "$cmd" >>$LOG
@ -62,7 +68,7 @@ finish()
pass()
{
echo '\r\033[42;30m PASS \033[0m '
g_echo '\r\033[42;30m PASS \033[0m '
echo "$step: PASS" >>$LOG
finish </dev/null
}
@ -70,7 +76,7 @@ pass()
fail()
{
echo '\r\033[41;37m FAIL \033[0m '
g_echo '\r\033[41;37m FAIL \033[0m '
echo "$step: FAIL" >>$LOG
finish
#
@ -82,7 +88,7 @@ fail()
todo()
{
echo '\r\033[43;30m TODO \033[0m '
g_echo '\r\033[43;30m TODO \033[0m '
echo "$step: TODO" >>$LOG
finish </dev/null
}