mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
test perl language directly
This commit is contained in:
parent
9a56f8dca0
commit
d24055cb40
8 changed files with 69 additions and 69 deletions
|
|
@ -981,30 +981,6 @@ def test_manifest_hooks(tempdir_factory, store):
|
|||
)
|
||||
|
||||
|
||||
def test_perl_hook(tempdir_factory, store):
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'perl_hooks_repo',
|
||||
'perl-hook', [], b'Hello from perl-commit Perl!\n',
|
||||
)
|
||||
|
||||
|
||||
def test_local_perl_additional_dependencies(store):
|
||||
config = {
|
||||
'repo': 'local',
|
||||
'hooks': [{
|
||||
'id': 'hello',
|
||||
'name': 'hello',
|
||||
'entry': 'perltidy --version',
|
||||
'language': 'perl',
|
||||
'additional_dependencies': ['SHANCOCK/Perl-Tidy-20211029.tar.gz'],
|
||||
}],
|
||||
}
|
||||
hook = _get_hook(config, store, 'hello')
|
||||
ret, out = _hook_run(hook, (), color=False)
|
||||
assert ret == 0
|
||||
assert _norm_out(out).startswith(b'This is perltidy, v20211029')
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'repo',
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue