diff mbox series

[b4,6/6] src/tests: test for trailers with special characters

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

Commit Message

Brandon Maier Oct. 27, 2024, 3:33 p.m. UTC
Test that email trailers with special characters are parsed correctly.

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
---
 src/tests/samples/trailers-test-simple.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-simple.txt b/src/tests/samples/trailers-test-simple.txt
index da64caff8dfaa0cbc630c8ae3515f4508cfd0764..a82416354012d3c32f99b39d1918ac343f2b66cc 100644
--- a/src/tests/samples/trailers-test-simple.txt
+++ b/src/tests/samples/trailers-test-simple.txt
@@ -4,6 +4,7 @@  Date: Tue, 30 Aug 2022 11:19:07 -0400
 
 This is a simple trailer parsing test.
 
+Reported-by: "Doe, Jane" <jane@example.com>
 Reviewed-by: Bogus Bupkes <bogus@example.com>
 Fixes: abcdef01234567890
 Link: https://msgid.link/some@msgid.here
diff --git a/src/tests/test___init__.py b/src/tests/test___init__.py
index 85ccd190677daebc30b9987eb811d44a15dce79b..a4637b9c797367da462f062511fdf4e018a5b81e 100644
--- a/src/tests/test___init__.py
+++ b/src/tests/test___init__.py
@@ -57,7 +57,8 @@  def test_save_git_am_mbox(sampledir, tmp_path, source, regex, flags, ismbox):
 
 @pytest.mark.parametrize('source,expected', [
     ('trailers-test-simple',
-     [('person', 'Reviewed-by', 'Bogus Bupkes <bogus@example.com>', None),
+     [('person', 'Reported-by', '"Doe, Jane" <jane@example.com>', None),
+      ('person', 'Reviewed-by', 'Bogus Bupkes <bogus@example.com>', None),
       ('utility', 'Fixes', 'abcdef01234567890', None),
       ('utility', 'Link', 'https://msgid.link/some@msgid.here', None),
       ]),