Thread (63 messages) 63 messages, 7 authors, 2024-10-07

Re: [PATCH v5 2/2] t3404: employing test_line_count() to replace test

From: Patrick Steinhardt <hidden>
Date: 2024-10-07 10:54:39

On Mon, Oct 07, 2024 at 10:51:48AM +0000, Usman Akinyemi via GitGitGadget wrote:
quoted hunk ↗ jump to hunk
From: Usman Akinyemi <redacted>
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 96a65783c47..1073eb88fa2 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -281,7 +281,8 @@ test_expect_success 'stop on conflicting pick' '
 	test_cmp expect2 file1 &&
 	test "$(git diff --name-status |
 		sed -n -e "/^U/s/^U[^a-z]*//p")" = file1 &&
-	test 4 = $(grep -v "^#" < .git/rebase-merge/done | wc -l) &&
+	grep -v "^#" < .git/rebase-merge/done >actual &&
+	test_line_count = 4 actual &&
 	test 0 = $(grep -c "^[^#]" < .git/rebase-merge/git-rebase-todo)
 '
There's still the space between `<` and `.git/rebase-merge/git-rebase-todo`.
But overall this version looks good enough to me, so I don't think this
requires a reroll. Thanks!

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help