Skip to content

Commit

Permalink
Add lines with CRLF to test_ignore_dictionary
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Newman <peternewman@users.noreply.github.com>
  • Loading branch information
Jackenmen and peternewman committed Sep 12, 2022
1 parent 305706e commit 901e126
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions codespell_lib/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,16 @@ def test_ignore_dictionary(tmpdir, capsys):
with open(op.join(d, 'bad.txt'), 'w') as f:
f.write('1 abandonned 1\n'
'2 abandonned 2\n'
'3 abilty 3\n'
'3 abandonned 3\r\n'
'4 abilty 4\n'
'5 ackward 5\n'
'6 ackward 6\n'
'5 abilty 5\n'
'6 abilty 6\r\n'
'7 ackward 7\n'
'8 ackward 8\n'
'9 ackward 9\r\n'
'abondon\n')
bad_name = f.name
assert cs.main(bad_name) == 7
assert cs.main(bad_name) == 10
with open(op.join(d, 'ignore.txt'), 'w') as f:
f.write('abandonned\nabilty\r\nackward ')
assert cs.main('-I', f.name, bad_name) == 1
Expand Down

0 comments on commit 901e126

Please sign in to comment.