mirror of
https://github.com/codespell-project/codespell.git
synced 2025-05-21 01:17:01 +08:00
Add -L/--ignore-words-list to whitelist words directly without using an 'ignore file'. (#650)
This commit is contained in:

committed by
Eric Larson

parent
eafcf947cc
commit
4175f457f4
@ -198,6 +198,14 @@ def test_ignore_dictionary(reload_codespell_lib):
|
||||
assert cs.main('-I', f.name, d) == 1
|
||||
|
||||
|
||||
def test_ignore_word_list(reload_codespell_lib):
|
||||
"""Test ignore word list functionality"""
|
||||
with TemporaryDirectory() as d:
|
||||
with open(op.join(d, 'bad.txt'), 'w') as f:
|
||||
f.write('abandonned\nabondon\nabilty\n')
|
||||
assert cs.main('-Labandonned,someword', '-Labilty', d) == 1
|
||||
|
||||
|
||||
def test_custom_regex(reload_codespell_lib):
|
||||
"""Test custom word regex"""
|
||||
with TemporaryDirectory() as d:
|
||||
|
Reference in New Issue
Block a user