Skip to contentSkip to conversation

commit: fix test broken by jn/commit-no-change-wo-status

PATCH In review Ævar Arnfjörð Bjarmason 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 commit: fix test broken by jn/commit-no-change-wo-status

"commit: suppress status summary when no changes staged" in Jonathan Nieder's jn/commit-no-change-wo-status series changed git commit --dry-run output. But didn't update the t/t6040-tracking-info.sh test, which relied on the old output.

Change the test to check the new output, and additionally test stderr there while I'm at it.

---

This is 1/2 things causing black smoke in pu right now.

 t/t6040-tracking-info.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
t/t6040-tracking-info.sh +3 -2
index 1785e17..5f50f70 100755
@@ -70,8 +70,9 @@ test_expect_success 'status' '
 		git checkout b1 >/dev/null &&
 		# reports nothing to commit
 		test_must_fail git commit --dry-run
-	) >actual &&
-	grep "have 1 and 1 different" actual
+	) >actual 2>actual-err &&
+	grep "nothing to commit" actual &&
+	grep "Already on" actual-err
 '
 
 test_expect_success 'status when tracking lightweight tags' '
Signature · 1 line
1.7.1
#1 lore raw

t/t6040-tracking-info.sh test_expect_success 'status' ' · line 75

Quoted 10 lines · Ævar Arnfjörð Bjarmason

+++ b/t/t6040-tracking-info.sh

t/t6040-tracking-info.sh +3 -2
@@ -70,8 +70,9 @@ test_expect_success 'status' '
 		git checkout b1 >/dev/null &&
 		# reports nothing to commit
 		test_must_fail git commit --dry-run
-	) >actual &&
-	grep "have 1 and 1 different" actual
+	) >actual 2>actual-err &&
+	grep "nothing to commit" actual &&
+	grep "Already on" actual-err

Hmm, this looks rather like a bug in the series: it looks like as an unpleasant side-effect it eliminates the

# Not currently on any branch.

-like output.