Skip to content

Commit

Permalink
Add test case that includes a multi-line backslash indicator immediat…
Browse files Browse the repository at this point in the history
…ely prior to EOF
  • Loading branch information
jayaddison committed Feb 4, 2021
1 parent df4dd38 commit 26ebdc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/data/backslash_eof.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\
4 changes: 4 additions & 0 deletions tests/test_black.py
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,10 @@ def test_bpo_33660_workaround(self) -> None:
finally:
os.chdir(str(old_cwd))

def test_backslash_eof_no_exception(self) -> None:
source = "\\"
black.format_str(source, mode=DEFAULT_MODE)


with open(black.__file__, "r", encoding="utf-8") as _bf:
black_source_lines = _bf.readlines()
Expand Down

0 comments on commit 26ebdc5

Please sign in to comment.