summaryrefslogtreecommitdiffstats
path: root/tests/languages/fail_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/languages/fail_test.py')
-rw-r--r--tests/languages/fail_test.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/languages/fail_test.py b/tests/languages/fail_test.py
new file mode 100644
index 0000000..7c74886
--- /dev/null
+++ b/tests/languages/fail_test.py
@@ -0,0 +1,14 @@
+from __future__ import annotations
+
+from pre_commit.languages import fail
+from testing.language_helpers import run_language
+
+
+def test_fail_hooks(tmp_path):
+ ret = run_language(
+ tmp_path,
+ fail,
+ 'watch out for',
+ file_args=('bunnies',),
+ )
+ assert ret == (1, b'watch out for\n\nbunnies\n')