summaryrefslogtreecommitdiffstats
path: root/tests/commands
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:00:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:00:38 +0000
commit00f5354c65dff6a40cda6b5a2c633f9e92eca1e1 (patch)
treef86bffc17d1b6349d92d3e235560d4850793461f /tests/commands
parentReleasing debian version 2.18.1-1. (diff)
downloadpre-commit-00f5354c65dff6a40cda6b5a2c633f9e92eca1e1.tar.xz
pre-commit-00f5354c65dff6a40cda6b5a2c633f9e92eca1e1.zip
Merging upstream version 2.19.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/commands')
-rw-r--r--tests/commands/hook_impl_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/commands/hook_impl_test.py b/tests/commands/hook_impl_test.py
index b0159f8..3e20874 100644
--- a/tests/commands/hook_impl_test.py
+++ b/tests/commands/hook_impl_test.py
@@ -242,6 +242,18 @@ def test_run_ns_pre_push_new_branch_existing_rev(push_example):
assert ns is None
+def test_run_ns_pre_push_ref_with_whitespace(push_example):
+ src, src_head, clone, _ = push_example
+
+ with cwd(clone):
+ args = ('origin', src)
+ line = f'HEAD^{{/ }} {src_head} refs/heads/b2 {hook_impl.Z40}\n'
+ stdin = line.encode()
+ ns = hook_impl._run_ns('pre-push', False, args, stdin)
+
+ assert ns is None
+
+
def test_pushing_orphan_branch(push_example):
src, src_head, clone, _ = push_example