From acfbcf5009be72004f2093c9de5fab76d04ea273 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Wed, 20 Mar 2024 21:58:26 -0400 Subject: [PATCH] test(#20): add unit test for removal of trailing whitespace --- tests/test_wrap.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_wrap.py b/tests/test_wrap.py index c9f6212..18eabd8 100644 --- a/tests/test_wrap.py +++ b/tests/test_wrap.py @@ -89,6 +89,17 @@ Test Testing Test Testing Test Testing Test Testing Test Testing """ +TICKET_020 = """ +- first line first line first line first line first line first line first line + whitespace +- second line +""" +TICKET_020_TRUE_79 = """ +- first line first line first line first line first line first line first line + whitespace +- second line +""" + @pytest.mark.parametrize( ("text", "expected", "align_lists", "wrap"), @@ -97,12 +108,14 @@ (CASE_1, CASE_1_FALSE_80, False, 80), (CASE_1, CASE_1_TRUE_40, True, 40), (CASE_1, CASE_1_TRUE_80, True, 80), + (TICKET_020, TICKET_020_TRUE_79, True, 79), ], ids=[ "CASE_1_FALSE_40", "CASE_1_FALSE_80", "CASE_1_TRUE_40", "CASE_1_TRUE_80", + "TICKET_020_TRUE_79", ], ) def test_wrap(text: str, expected: str, align_lists: bool, wrap: int):