Thread (52 messages) 52 messages, 1 author, 2022-08-30
STALE1376d

[PATCH 33/51] test: completion: add missing test

From: Felipe Contreras <hidden>
Date: 2022-08-30 09:33:58
Subsystem: the rest · Maintainer: Linus Torvalds

Once the correct suffix in __git_complete_config_variable_name() is set,
we can add the test again.

Now it should work even in bash < 4.0.

Signed-off-by: Felipe Contreras <redacted>
---
 t/t9902-completion.sh     | 7 +++++++
 t/t9904-zsh-completion.sh | 7 +++++++
 2 files changed, 14 insertions(+)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 91dfb618c1..e1e9c6e365 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -2503,6 +2503,13 @@ test_expect_success 'git config - value' '
 	EOF
 '
 
+test_expect_success 'git config - direct completions' '
+	test_completion "git config branch.autoSetup" <<-\EOF
+	branch.autoSetupMerge Z
+	branch.autoSetupRebase Z
+	EOF
+'
+
 test_expect_success 'git -c - section' '
 	test_completion "git -c br" <<-\EOF
 	branch.Z
diff --git a/t/t9904-zsh-completion.sh b/t/t9904-zsh-completion.sh
index d0795ee014..42917833e8 100755
--- a/t/t9904-zsh-completion.sh
+++ b/t/t9904-zsh-completion.sh
@@ -1071,6 +1071,13 @@ test_expect_success 'git config - value' '
 	EOF
 '
 
+test_expect_success 'git config - direct completions' '
+	test_completion "git config branch.autoSetup" <<-\EOF
+	branch.autoSetupMerge Z
+	branch.autoSetupRebase Z
+	EOF
+'
+
 test_expect_success 'git -c - section' '
 	test_completion "git -c br" <<-\EOF
 	branch.Z
-- 
2.37.2.351.g9bf691b78c.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help