Adding upstream version 4.5.0+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
27cd5628db
commit
6bd375ed5f
108 changed files with 6514 additions and 0 deletions
15
tests/check_byte_order_marker_test.py
Normal file
15
tests/check_byte_order_marker_test.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pre_commit_hooks import check_byte_order_marker
|
||||
|
||||
|
||||
def test_failure(tmpdir):
|
||||
f = tmpdir.join('f.txt')
|
||||
f.write_text('ohai', encoding='utf-8-sig')
|
||||
assert check_byte_order_marker.main((str(f),)) == 1
|
||||
|
||||
|
||||
def test_success(tmpdir):
|
||||
f = tmpdir.join('f.txt')
|
||||
f.write_text('ohai', encoding='utf-8')
|
||||
assert check_byte_order_marker.main((str(f),)) == 0
|
Loading…
Add table
Add a link
Reference in a new issue