Thread (24 messages) flat view 24 messages, 3 authors, 2016-06-15

Re: [PATCHv4 07/15] t4019 (diff-wserror): add lots of missing &&

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:40
Subsystem: the rest · Maintainer: Linus Torvalds

Elijah Newren wrote:
quoted hunk ↗ jump to hunk
--- a/t/t4019-diff-wserror.sh
+++ b/t/t4019-diff-wserror.sh
@@ -40,7 +40,7 @@ prepare_output () {
 
 test_expect_success default '
 
-	prepare_output
+	prepare_output &&
The exit status from prepare_output is the exit status from its last
command, which is "grep -v <something blue>".  It seems that never
fails in these test cases, but should we be relying on that?

(I haven't thought hard about the answer.  If we shouldn't be, a
workaround could look like this.)
diff --git a/t/t4019-diff-wserror.sh b/t/t4019-diff-wserror.sh
index 36f06c7..afd74c8 100755
--- a/t/t4019-diff-wserror.sh
+++ b/t/t4019-diff-wserror.sh
@@ -36,6 +36,7 @@ prepare_output () {
 	git diff --color >output
 	$grep_a "$blue_grep" output >error
 	$grep_a -v "$blue_grep" output >normal
+	:
 }
 
 test_expect_success default '
-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help