Date:2011-06-07 02:55:47 (12 years 9 months ago)
Author:Werner Almesberger
Commit:6e3edf3d2e8af5f2d158fac3dd8b6bc5efb7d7e9
Message: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
Files: prod/Common (4 diffs)

Change Details

prod/Common
5151##### Test result ###########################################################
5252
5353
54g_echo()
55{
56    /bin/echo -e "$@"
57}
58
59
5460finish()
5561{
5662    echo "$cmd" >>$LOG
...... 
6268
6369pass()
6470{
65    echo '\r\033[42;30m PASS \033[0m '
71    g_echo '\r\033[42;30m PASS \033[0m '
6672    echo "$step: PASS" >>$LOG
6773    finish </dev/null
6874}
...... 
7076
7177fail()
7278{
73    echo '\r\033[41;37m FAIL \033[0m '
79    g_echo '\r\033[41;37m FAIL \033[0m '
7480    echo "$step: FAIL" >>$LOG
7581    finish
7682#
...... 
8288
8389todo()
8490{
85    echo '\r\033[43;30m TODO \033[0m '
91    g_echo '\r\033[43;30m TODO \033[0m '
8692    echo "$step: TODO" >>$LOG
8793    finish </dev/null
8894}

Archive Download the corresponding diff file



interactive