mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-31 10:36:54 +00:00
Fix mixed-line-ending tests on windows
This commit is contained in:
parent
fc8a5b27e9
commit
47c4d9ebed
1 changed files with 4 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ TESTS_FIX_AUTO = (
|
|||
)
|
||||
def test_mixed_line_ending_fix_auto(input_s, expected_retval, output, tmpdir):
|
||||
path = tmpdir.join('file.txt')
|
||||
path.write(input_s)
|
||||
path.write_binary(input_s)
|
||||
ret = mixed_line_ending(('--fix=auto', path.strpath))
|
||||
|
||||
assert ret == expected_retval
|
||||
|
|
@ -69,7 +69,7 @@ TESTS_NO_FIX = (
|
|||
)
|
||||
def test_detect_mixed_line_ending(input_s, expected_retval, output, tmpdir):
|
||||
path = tmpdir.join('file.txt')
|
||||
path.write(input_s)
|
||||
path.write_binary(input_s)
|
||||
ret = mixed_line_ending(('--fix=no', path.strpath))
|
||||
|
||||
assert ret == expected_retval
|
||||
|
|
@ -108,7 +108,7 @@ def test_mixed_line_ending_fix_force_lf(
|
|||
tmpdir,
|
||||
):
|
||||
path = tmpdir.join('file.txt')
|
||||
path.write(input_s)
|
||||
path.write_binary(input_s)
|
||||
ret = mixed_line_ending(('--fix=lf', path.strpath))
|
||||
|
||||
assert ret == expected_retval
|
||||
|
|
@ -147,7 +147,7 @@ def test_mixed_line_ending_fix_force_crlf(
|
|||
tmpdir,
|
||||
):
|
||||
path = tmpdir.join('file.txt')
|
||||
path.write(input_s)
|
||||
path.write_binary(input_s)
|
||||
ret = mixed_line_ending(('--fix=crlf', path.strpath))
|
||||
|
||||
assert ret == expected_retval
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue