git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] color: add support for 12-bit RGB colors

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 30, 2024, 19:01 UTC
Message-ID
<xmqqa5laznbx.fsf@gitster.g>
In-Reply-To
<xmqqikzyzoam.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> Ah, I take it back.  The preimage was added by [2/3] so it is fair
> to say that that step would be the right place to do that from the
> get-go.
Perhaps something like this can be squashed in.
Subject: [PATCH] fixup! t/t4026-color: add test coverage for invalid RGB colors
---
 t/t4026-color.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/t/t4026-color.sh b/t/t4026-color.sh
index 9a6f8a4bc5..e60aa588c2 100755
--- a/t/t4026-color.sh
+++ b/t/t4026-color.sh
@@ -140,6 +140,14 @@ test_expect_success 'extra character after attribute' '
 	invalid_color "dimX"
 '
 
+test_expect_success 'wrong number of letters in RGB color' '
+	invalid_color "#1" &&
+	invalid_color "#23" &&
+	invalid_color "#4567" &&
+	invalid_color "#89abc" &&
+	invalid_color "#def0123"
+'
+
 test_expect_success 'non-hex character in RGB color' '
 	invalid_color "#x23456" &&
 	invalid_color "#1x3456" &&
-- 
2.45.0
Previous: Junio C HamanoNext: Jeff King
Message 11 of 13 in “color: add support for 12-bit RGB colors”
  1. 0/3 color: add support for 12-bit RGB colorsBeat Bolli, Apr 29, 2024
  2. 1/3 t/t4026-color: remove an extra double quote characterBeat Bolli, Apr 29, 2024
  3. Jeff KingApr 30, 2024
  4. 2/3 t/t4026-color: add test coverage for invalid RGB colorsBeat Bolli, Apr 29, 2024
  5. 3/3 color: add support for 12-bit RGB colorsBeat Bolli, Apr 29, 2024
  6. Junio C HamanoApr 29, 2024
  7. Beat BolliApr 29, 2024
  8. Jeff KingApr 30, 2024
  9. Junio C HamanoApr 30, 2024
  10. Junio C HamanoApr 30, 2024
  11. Junio C HamanoApr 30, 2024
  12. Jeff KingMay 3, 2024
  13. Taylor BlauApr 29, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.