From a5907b904f568d3249b7629ea9ff3b932f723ce3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 19 Jun 2022 09:00:25 +0200 Subject: Adding upstream version 2.19.0. Signed-off-by: Daniel Baumann --- tests/commands/hook_impl_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/commands') 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 -- cgit v1.2.3