mirror of
https://github.com/codespell-project/codespell.git
synced 2025-08-06 09:40:56 +08:00
Add new --check-filenames option to check file names as well
A new command line option -f / --check-filenames is implemented which enables the check of the given file names.
This commit is contained in:
@ -248,6 +248,14 @@ def test_ignore():
|
||||
assert_equal(cs.main('--skip=ignoredir', d), 1)
|
||||
|
||||
|
||||
def test_check_filename():
|
||||
"""Test filename check"""
|
||||
with TemporaryDirectory() as d:
|
||||
with open(op.join(d, 'abandonned.txt'), 'w') as f:
|
||||
f.write('.')
|
||||
assert_equal(cs.main('-f', d), 1)
|
||||
|
||||
|
||||
class TemporaryDirectory(object):
|
||||
"""Backport for 2.7"""
|
||||
|
||||
|
Reference in New Issue
Block a user