From: Nazri Ramliy Date: Tue, 29 Jun 2010 07:47:08 +0000 (+0800) Subject: Add test for correct coloring of git log --decoration X-Git-Tag: v1.7.2-rc1~2^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=567102819ac56ccf7eb638ea8b5c975c03e88558;p=git.git Add test for correct coloring of git log --decoration Signed-off-by: Nazri Ramliy Signed-off-by: Junio C Hamano --- diff --git a/t/t4207-log-decoration-colors.sh b/t/t4207-log-decoration-colors.sh new file mode 100755 index 000000000..bbde31b01 --- /dev/null +++ b/t/t4207-log-decoration-colors.sh @@ -0,0 +1,66 @@ +#!/bin/sh +# +# Copyright (c) 2010 Nazri Ramliy +# + +test_description='Test for "git log --decorate" colors' + +. ./test-lib.sh + +get_color () +{ + git config --get-color no.such.slot "$1" +} + +test_expect_success setup ' + git config diff.color.commit yellow && + git config color.decorate.branch green && + git config color.decorate.remoteBranch red && + git config color.decorate.tag "reverse bold yellow" && + git config color.decorate.stash magenta && + git config color.decorate.HEAD cyan && + + c_reset=$(get_color reset) && + + c_commit=$(get_color yellow) && + c_branch=$(get_color green) && + c_remoteBranch=$(get_color red) && + c_tag=$(get_color "reverse bold yellow") && + c_stash=$(get_color magenta) && + c_HEAD=$(get_color cyan) && + + test_commit A && + git clone . other && + ( + cd other && + test_commit A1 + ) && + + git remote add -f other ./other && + test_commit B && + git tag v1.0 && + echo >>A.t && + git stash save Changes to A.t +' + +cat >expected <out && + test_cmp expected out +' + +test_done