mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 17:14:43 +04:00
Merge pull request #298 from chriskuehl/fix-grep-flags-on-old-grep
Use a different test for grep flags to support old grep
This commit is contained in:
commit
3ac1041ce4
2 changed files with 5 additions and 5 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
files: ''
|
files: ''
|
||||||
- id: regex-with-grep-args
|
- id: regex-with-grep-args
|
||||||
name: Regex with grep extra arguments
|
name: Regex with grep extra arguments
|
||||||
entry: foo\sbar
|
entry: foo.+bar
|
||||||
language: pcre
|
language: pcre
|
||||||
files: ''
|
files: ''
|
||||||
args: [-z]
|
args: [-i]
|
||||||
|
|
|
||||||
|
|
@ -224,15 +224,15 @@ def test_pcre_hook_matching(tempdir_factory, store):
|
||||||
|
|
||||||
@xfailif_no_pcre_support
|
@xfailif_no_pcre_support
|
||||||
@pytest.mark.integration
|
@pytest.mark.integration
|
||||||
def test_pcre_hook_extra_multiline_option(tempdir_factory, store):
|
def test_pcre_hook_case_insensitive_option(tempdir_factory, store):
|
||||||
path = git_dir(tempdir_factory)
|
path = git_dir(tempdir_factory)
|
||||||
with cwd(path):
|
with cwd(path):
|
||||||
with io.open('herp', 'w') as herp:
|
with io.open('herp', 'w') as herp:
|
||||||
herp.write("foo\nbar\n")
|
herp.write('FoOoOoObar\n')
|
||||||
|
|
||||||
_test_hook_repo(
|
_test_hook_repo(
|
||||||
tempdir_factory, store, 'pcre_hooks_repo',
|
tempdir_factory, store, 'pcre_hooks_repo',
|
||||||
'regex-with-grep-args', ['herp'], b"herp:1:foo\nbar\n\x00",
|
'regex-with-grep-args', ['herp'], b'herp:1:FoOoOoObar\n',
|
||||||
expected_return_code=123,
|
expected_return_code=123,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue