mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 16:44:42 +04:00
Allow '.format('-like strings in arguments. Resolves #314.
This commit is contained in:
parent
97735a3883
commit
005cb868e0
3 changed files with 19 additions and 19 deletions
|
|
@ -178,6 +178,22 @@ def test_run_hook_with_spaced_args(tempdir_factory, store):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_run_hook_with_curly_braced_arguments(tempdir_factory, store):
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'arg_per_line_hooks_repo',
|
||||
'arg-per-line',
|
||||
[],
|
||||
b"arg: hi {1}\narg: I'm {a} problem\n",
|
||||
config_kwargs={
|
||||
'hooks': [{
|
||||
'id': 'arg-per-line',
|
||||
'args': ['hi {1}', "I'm {a} problem"],
|
||||
}]
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@xfailif_no_pcre_support
|
||||
@pytest.mark.integration
|
||||
def test_pcre_hook_no_match(tempdir_factory, store):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue