X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/3fca540d05a0f0b4480cfcce84d7e0392270b841..51141f1af4aab0e0c7f71932ffe06482a884f1d5:/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()