@asottile review.

This commit is contained in:
Rémy HUBSCHER 2020-02-05 18:48:00 +01:00
parent fee5d54499
commit 5b03f496ab
No known key found for this signature in database
GPG key ID: A500E24B95405094

View file

@ -78,6 +78,21 @@ def test_fixes_custom_ext_markdown_files(tmpdir, ext):
)
@pytest.mark.parametrize('ext', ('md', '.md', 'Md'))
def test_complex_ext_are_not_wrongly_recognized(tmpdir, ext):
path = tmpdir.join(f'test.fmd')
path.write(
'foo \n'
'bar \n'
'baz \n'
'\t\n'
'\n ',
)
ret = main((path.strpath, '--markdown-linebreak-ext={}'.format(ext)))
assert ret == 1
assert path.read() == ('foo\nbar\nbaz\n\n\n')
@pytest.mark.parametrize('arg', ('--', 'a/b', ''))
def test_markdown_linebreak_ext_badopt(arg):
with pytest.raises(SystemExit) as excinfo: