pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pre-commit/pre-commit/commit/04471f7d9795f6d7aee49a9db710bf0c27a21866

rigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-7a1ad343bd40328c.css" /> Add perl additional dependencies test · pre-commit/pre-commit@04471f7 · GitHub
Skip to content

Commit 04471f7

Browse files
committed
Add perl additional dependencies test
1 parent 1295364 commit 04471f7

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
use ExtUtils::MakeMaker;
2+
3+
WriteMakefile(
4+
NAME => "PreCommitDummy",
5+
VERSION => "0.0.1",
6+
);

pre_commit/store.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ def _git_cmd(*args: str) -> None:
184184
LOCAL_RESOURCES = (
185185
'Cargo.toml', 'main.go', 'main.rs', '.npmignore', 'package.json',
186186
'pre_commit_dummy_package.gemspec', 'setup.py', 'environment.yml',
187+
'Makefile.PL',
187188
)
188189

189190
def make_local(self, deps: Sequence[str]) -> str:

tests/repository_test.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,3 +883,20 @@ def test_perl_hook(tempdir_factory, store):
883883
tempdir_factory, store, 'perl_hooks_repo',
884884
'perl-hook', [], b'Hello from perl-commit Perl!\n',
885885
)
886+
887+
888+
def test_local_perl_additional_dependencies(store):
889+
config = {
890+
'repo': 'local',
891+
'hooks': [{
892+
'id': 'hello',
893+
'name': 'hello',
894+
'entry': 'perltidy --version',
895+
'language': 'perl',
896+
'additional_dependencies': ['SHANCOCK/Perl-Tidy-20200110.tar.gz'],
897+
}],
898+
}
899+
hook = _get_hook(config, store, 'hello')
900+
ret, out = _hook_run(hook, (), color=False)
901+
assert ret == 0
902+
assert _norm_out(out).startswith(b'This is perltidy, v20200110')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy