diff mbox series

[b4,v2,4/6] src/tests: test for trailers with improper formatting

Message ID 20241027-trailer-special-chars-v2-4-e963f78b3ef8@gmail.com (mailing list archive)
State New
Headers show
Series Handle patch trailers with special characters | expand

Commit Message

Brandon Maier Oct. 27, 2024, 10:34 p.m. UTC
Check that a trailer with an improperly formatted email address will
still parse to something usable.

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
---
 src/tests/samples/trailers-test-extinfo.txt | 1 +
 src/tests/test___init__.py                  | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/tests/samples/trailers-test-extinfo.txt b/src/tests/samples/trailers-test-extinfo.txt
index aa61e8d635923c2e2539b82c60f69b489ad7cee3..5417cdd87bfdf4ddb278e125a6dd04d2e86af141 100644
--- a/src/tests/samples/trailers-test-extinfo.txt
+++ b/src/tests/samples/trailers-test-extinfo.txt
@@ -4,6 +4,7 @@  Date: Tue, 30 Aug 2022 11:19:07 -0400
 
 This is a simple trailer parsing test.
 
+Reported-by: Some, One <somewhere@example.com>
 Reviewed-by: Bogus Bupkes <bogus@example.com>
 [for the parts that are bogus]
 Fixes: abcdef01234567890
diff --git a/src/tests/test___init__.py b/src/tests/test___init__.py
index 7fe43b0158460f06d0a2b52d2689d26e7ef7f840..85ccd190677daebc30b9987eb811d44a15dce79b 100644
--- a/src/tests/test___init__.py
+++ b/src/tests/test___init__.py
@@ -62,7 +62,8 @@  def test_save_git_am_mbox(sampledir, tmp_path, source, regex, flags, ismbox):
       ('utility', 'Link', 'https://msgid.link/some@msgid.here', None),
       ]),
     ('trailers-test-extinfo',
-     [('person', 'Reviewed-by', 'Bogus Bupkes <bogus@example.com>', '[for the parts that are bogus]'),
+     [('unknown', 'Reported-by', 'Some, One <somewhere@example.com>', None),
+      ('person', 'Reviewed-by', 'Bogus Bupkes <bogus@example.com>', '[for the parts that are bogus]'),
       ('utility', 'Fixes', 'abcdef01234567890', None),
       ('person', 'Tested-by', 'Some Person <bogus2@example.com>', '           [this person visually indented theirs]'),
       ('utility', 'Link', 'https://msgid.link/some@msgid.here', '  # initial submission'),