mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Allow args for pcre hook
This commit is contained in:
parent
8a43a65557
commit
f0c198f1ad
3 changed files with 24 additions and 1 deletions
|
|
@ -222,6 +222,21 @@ def test_pcre_hook_matching(tempdir_factory, store):
|
|||
)
|
||||
|
||||
|
||||
@xfailif_no_pcre_support
|
||||
@pytest.mark.integration
|
||||
def test_pcre_hook_extra_multiline_option(tempdir_factory, store):
|
||||
path = git_dir(tempdir_factory)
|
||||
with cwd(path):
|
||||
with io.open('herp', 'w') as herp:
|
||||
herp.write("foo\nbar\n")
|
||||
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'pcre_hooks_repo',
|
||||
'regex-with-grep-args', ['herp'], b"herp:1:foo\nbar\n\x00",
|
||||
expected_return_code=123,
|
||||
)
|
||||
|
||||
|
||||
@xfailif_no_pcre_support
|
||||
@pytest.mark.integration
|
||||
def test_pcre_many_files(tempdir_factory, store):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue