Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ac1041

Browse files
committed
Merge pull request #298 from chriskuehl/fix-grep-flags-on-old-grep
Use a different test for grep flags to support old grep
2 parents e80f203 + 31bc019 commit 3ac1041

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

testing/resources/pcre_hooks_repo/hooks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
files: ''
1111
- id: regex-with-grep-args
1212
name: Regex with grep extra arguments
13-
entry: foo\sbar
13+
entry: foo.+bar
1414
language: pcre
1515
files: ''
16-
args: [-z]
16+
args: [-i]

tests/repository_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,15 @@ def test_pcre_hook_matching(tempdir_factory, store):
224224

225225
@xfailif_no_pcre_support
226226
@pytest.mark.integration
227-
def test_pcre_hook_extra_multiline_option(tempdir_factory, store):
227+
def test_pcre_hook_case_insensitive_option(tempdir_factory, store):
228228
path = git_dir(tempdir_factory)
229229
with cwd(path):
230230
with io.open('herp', 'w') as herp:
231-
herp.write("foo\nbar\n")
231+
herp.write('FoOoOoObar\n')
232232

233233
_test_hook_repo(
234234
tempdir_factory, store, 'pcre_hooks_repo',
235-
'regex-with-grep-args', ['herp'], b"herp:1:foo\nbar\n\x00",
235+
'regex-with-grep-args', ['herp'], b'herp:1:FoOoOoObar\n',
236236
expected_return_code=123,
237237
)
238238

0 commit comments

Comments
 (0)