mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-03 10:56:52 +00:00
Edge case with mixed endings
Added case for which the file has mixed line endings. In this case, default into using LF for end of file line.
This commit is contained in:
parent
c881808ed6
commit
203735ecf7
2 changed files with 6 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ TESTS = (
|
|||
(b'\xe2\x98\x83', 1, b'\xe2\x98\x83\n'),
|
||||
(b'foo\r\n', 0, b'foo\r\n'),
|
||||
(b'foo\r\nbar', 1, b'foo\r\nbar\r\n'),
|
||||
(b'foo\nbar\r\nbaz', 1, b'foo\nbar\r\nbaz\n'),
|
||||
(b'foo\r\n\r\n\r\n', 1, b'foo\r\n'),
|
||||
(b'foo\r', 0, b'foo\r'),
|
||||
(b'foo\r\r\r\r', 1, b'foo\r'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue