[PATCH] t/t9001-send-email.sh: fix '&&' chain in some tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



t/README recommends chaining test assertions.

Signed-off-by: Antonio Ospite <ospite@xxxxxxxxxxxxxxxxx>
---

Hi,

there are a couple of tests I didn't fix here, they are storing intermediate
return values, see "confirm by default (due to cc)" and following in
t/t9001-send-email.sh

I don't know if chaining is correct already there.

Thanks,
   Antonio

 t/t9001-send-email.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index d1ba252..ac1af86 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -265,7 +265,7 @@ test_expect_success $PREREQ 'Author From: in message body' '
 		--to=nobody@xxxxxxxxxxx \
 		--smtp-server="$(pwd)/fake.sendmail" \
 		$patches &&
-	sed "1,/^\$/d" < msgtxt1 > msgbody1
+	sed "1,/^\$/d" < msgtxt1 > msgbody1 &&
 	grep "From: A <author@xxxxxxxxxxx>" msgbody1
 '
 
@@ -276,7 +276,7 @@ test_expect_success $PREREQ 'Author From: not in message body' '
 		--to=nobody@xxxxxxxxxxx \
 		--smtp-server="$(pwd)/fake.sendmail" \
 		$patches &&
-	sed "1,/^\$/d" < msgtxt1 > msgbody1
+	sed "1,/^\$/d" < msgtxt1 > msgbody1 &&
 	! grep "From: A <author@xxxxxxxxxxx>" msgbody1
 '
 
@@ -298,7 +298,7 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '
 		--in-reply-to=" " \
 		--smtp-server="$(pwd)/fake.sendmail" \
 		$patches \
-		2>errors
+		2>errors &&
 	! grep "^In-Reply-To: < *>" msgtxt1
 '
 
@@ -574,7 +574,7 @@ EOF
 "
 
 test_expect_success $PREREQ '--suppress-cc=sob' '
-	git config --unset sendemail.cccmd
+	git config --unset sendemail.cccmd &&
 	test_suppression sob
 '
 
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]