diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2009-12-08 11:12:02 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-12-08 21:52:47 -0800 |
commit | 68cfc6f551a02d29a2bc48c6473fad6ab42a476f (patch) | |
tree | 78ce6520b3360c75565d16b52bd191f0bc2e0b48 /t/test-lib.sh | |
parent | c521bb7114e081d81eb7cd77cf5989d30160d0a2 (diff) | |
download | git-68cfc6f551a02d29a2bc48c6473fad6ab42a476f.tar.gz |
t7508-status: test all modes with color
Move a useful script function to decode colored output to
text form from t4034 and use it in this test as well.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 5fdc5d94a2..d63ad2d870 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -208,6 +208,17 @@ test_set_editor () { export VISUAL } +test_decode_color () { + sed -e 's/.\[1m/<WHITE>/g' \ + -e 's/.\[31m/<RED>/g' \ + -e 's/.\[32m/<GREEN>/g' \ + -e 's/.\[33m/<YELLOW>/g' \ + -e 's/.\[34m/<BLUE>/g' \ + -e 's/.\[35m/<MAGENTA>/g' \ + -e 's/.\[36m/<CYAN>/g' \ + -e 's/.\[m/<RESET>/g' +} + test_tick () { if test -z "${test_tick+set}" then |