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

[PATCH 14/51] test: completion: switch __gitcomp_nl prefix test

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

By default COMP_WORDBREAKS includes =, so it's not realistic to test for
a prefix that almost never will be there.

In bash there are no functional changes, but in zsh this makes the test
pass.

Signed-off-by: Felipe Contreras <redacted>
---
 t/t9902-completion.sh     | 6 +++---
 t/t9904-zsh-completion.sh | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 031f05cf47..2fe056ab59 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -565,9 +565,9 @@ test_expect_success '__gitcomp_nl - trailing space' '
 '
 
 test_expect_success '__gitcomp_nl - prefix' '
-	test_gitcomp_nl "--fixup=m" "$refs" "--fixup=" "m" <<-EOF
-	--fixup=main Z
-	--fixup=maint Z
+	test_gitcomp_nl "branch.m" "$refs" "branch." "m" <<-EOF
+	branch.main Z
+	branch.maint Z
 	EOF
 '
 
diff --git a/t/t9904-zsh-completion.sh b/t/t9904-zsh-completion.sh
index e9df29c135..dbd0671ab6 100755
--- a/t/t9904-zsh-completion.sh
+++ b/t/t9904-zsh-completion.sh
@@ -180,10 +180,10 @@ test_expect_success '__gitcomp_nl - trailing space' '
 	EOF
 '
 
-test_expect_failure '__gitcomp_nl - prefix' '
-	test_gitcomp_nl "--fixup=m" "$refs" "--fixup=" "m" <<-EOF
-	--fixup=main Z
-	--fixup=maint Z
+test_expect_success '__gitcomp_nl - prefix' '
+	test_gitcomp_nl "branch.m" "$refs" "branch." "m" <<-EOF
+	branch.main Z
+	branch.maint Z
 	EOF
 '
 
-- 
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