X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/3fca540d05a0f0b4480cfcce84d7e0392270b841..6a105e019fcaa10cc0b6fb59edea4a4018eac97e:/tests/test_black.py diff --git a/tests/test_black.py b/tests/test_black.py index cfd3cbd..a2efef8 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -1793,6 +1793,11 @@ class BlackTestCase(BlackBaseTestCase): finally: os.chdir(str(old_cwd)) + def test_newline_comment_interaction(self) -> None: + source = "class A:\\\r\n# type: ignore\n pass\n" + output = black.format_str(source, mode=DEFAULT_MODE) + black.assert_stable(source, output, mode=DEFAULT_MODE) + with open(black.__file__, "r", encoding="utf-8") as _bf: black_source_lines = _bf.readlines()