]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t6006-rev-list-format.sh
rev-list: pass diffopt->use_colors through to pretty-print
[thirdparty/git.git] / t / t6006-rev-list-format.sh
index 647218b4ef9700dc383a75976319d2de2fee18f3..7b97a90bae23f64140d0baf577b9f6008502f2bb 100755 (executable)
@@ -245,6 +245,17 @@ test_expect_success '%C(auto) respects --no-color' '
        test_cmp expect actual
 '
 
+test_expect_success 'rev-list %C(auto,...) respects --color' '
+       git rev-list --color --format="%C(auto,green)foo%C(auto,reset)" \
+               -1 HEAD >actual.raw &&
+       test_decode_color <actual.raw >actual &&
+       cat >expect <<-EOF &&
+       commit $(git rev-parse HEAD)
+       <GREEN>foo<RESET>
+       EOF
+       test_cmp expect actual
+'
+
 iconv -f utf-8 -t $test_encoding > commit-msg <<EOF
 Test printing of complex bodies