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

[PATCH v2 2/3] t9001-send-email.sh: update alias list used for pine test

From
Jacob Keller <jacob.e.keller@intel.com>
Date
Aug 14, 2024, 00:05 UTC
Message-ID
<20240813-jk-translate-alias-send-email-v2-2-912db4eb6846@gmail.com>
In-Reply-To
<20240813-jk-translate-alias-send-email-v2-0-912db4eb6846@gmail.com>
From: Jacob Keller <jacob.keller@gmail.com>

The set of aliases used for the pine --dump-aliases test do not perfectly mesh with the way the pine address book is defined. While technically all valid, there are some oddities including bob's name being partially split so that the actual address is returned as "Bobbyton <bob@example.com". A strict reading of the pine documentation indicates that the address should either be of the form "address@domain" or a comma separated list of address, name/address pairs, or other aliases enclosed by ().

The parsing implementation in git-send-email is not as strict, but it makes sense to ensure the test data used is. Although the --dump-aliases test does not make use of the address data, it is helpful to avoid giving future developers the wrong impression of the file format.

Also add an alias which translates to multiple addresses using the () format.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
---
 t/t9001-send-email.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index aa36ace393b7..c96d6955b9f2 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -2093,13 +2093,15 @@ test_dump_aliases '--dump-aliases mailrc format' \
 test_dump_aliases '--dump-aliases pine format' \
 	'pine' \
 	'alice' \
+	'bcgrp' \
 	'bob' \
 	'chloe' \
 	'eve' <<-\EOF
-	alice	Alice W Land	<awol@example.com>
-	eve	Eve	<eve@example.com>
-	bob	Robert	Bobbyton <bob@example.com>
+	alice	Alice W Land	awol@example.com		Friend
+	eve	Eve	eve@example.com
+	bob	Robert Bobbyton	bob@example.com
 	chloe		chloe@example.com
+	bcgrp		(bob, chloe, Other <o@example.com>)
 	EOF
 
 test_dump_aliases '--dump-aliases gnus format' \
-- 
2.46.0.124.g2dc1a81c8933
Previous: Jacob KellerNext: Junio C Hamano
Message 5 of 13 in “send-email: teach git send-email mode to translate aliases”
  1. 0/3 send-email: teach git send-email mode to translate aliasesJacob Keller, Aug 14, 2024
  2. 1/3 t90001-send-email.sh: fix quoting for mailrc --dump-aliases testJacob Keller, Aug 14, 2024
  3. Junio C HamanoAug 14, 2024
  4. 3/3 send-email: teach git send-email option to translate aliasesJacob Keller, Aug 14, 2024
  5. 2/3 t9001-send-email.sh: update alias list used for pine testJacob Keller, Aug 14, 2024
  6. Junio C HamanoAug 14, 2024
  7. Jacob KellerAug 14, 2024
  8. Junio C HamanoAug 14, 2024
  9. Jacob KellerAug 14, 2024
  10. Junio C HamanoAug 14, 2024
  11. Konstantin RyabitsevAug 15, 2024
  12. Junio C HamanoAug 15, 2024
  13. Keller, Jacob EAug 15, 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.