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