]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t9001-send-email.sh: update alias list used for pine test
authorJacob Keller <jacob.keller@gmail.com>
Wed, 14 Aug 2024 00:05:10 +0000 (17:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Aug 2024 19:13:00 +0000 (12:13 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9001-send-email.sh

index aa36ace393b713513200b9cf7fa1fb6863e20eec..c96d6955b9f298cab30f325b90529b6b8a71f607 100755 (executable)
@@ -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' \