]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t9001-send-email.sh: fix quoting for mailrc --dump-aliases test
authorJacob Keller <jacob.keller@gmail.com>
Wed, 14 Aug 2024 00:05:09 +0000 (17:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Aug 2024 16:55:03 +0000 (09:55 -0700)
The .mailrc alias file format documents that multiple addresses are
separated by spaces. The alias file used in the t9001 --dump-aliases
mailrc test have addresses which include both a name and email. These
are unquoted, so git send-email will parse this as an alias that
translates to multiple independent addresses.

The existing test does not care about this, as --dump-aliases only dumps
the alias and not the address. However, it is incorrect for a future
where --dump-aliases could also dump the mail addresses.

Fix the test to quote the aliases properly, so that they translate to a
single address.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9001-send-email.sh

index 64a4ab3736ef86ae6cd92d6f0370c76565d124a0..aa36ace393b713513200b9cf7fa1fb6863e20eec 100755 (executable)
@@ -2084,9 +2084,9 @@ test_dump_aliases '--dump-aliases mailrc format' \
        'bob' \
        'chloe' \
        'eve' <<-\EOF
-       alias alice   Alice W Land <awol@example.com>
-       alias eve     Eve <eve@example.com>
-       alias bob     Robert Bobbyton <bob@example.com>
+       alias alice   "Alice W Land <awol@example.com>"
+       alias eve     "Eve <eve@example.com>"
+       alias bob     "Robert Bobbyton <bob@example.com>"
        alias chloe   chloe@example.com
        EOF