Re: [PATCH 2/6] add a test for git-send-email for threaded mails without chain-reply-to

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 2/6] add a test for git-send-email for threaded mails without chain-reply-to

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:55

Markus Heidelberg [off-list ref] writes:
+test_expect_failure 'threading but no chain-reply-to' '
+	git send-email \
+		--dry-run \
+		--from="Example [off-list ref]" \
+		--to=nobody@example.com \
+		--thread \
+		--nochain-reply-to \
+		$patches $patches |
+	grep "In-Reply-To: "
+'
Thanks, but this is not a very good style, as it won't catch if "git
send-email" dumps core or otherwise fails, exiting with a non-zero status.

Same comments applies to [PATCH 4/6] as well.

Re: [PATCH 2/6] add a test for git-send-email for threaded mails without chain-reply-to

From: Markus Heidelberg <hidden>
Date: 2016-06-15 22:46:55

Junio C Hamano, 08.06.2009:
Markus Heidelberg [off-list ref] writes:
quoted
+test_expect_failure 'threading but no chain-reply-to' '
+	git send-email \
+		--dry-run \
+		--from="Example [off-list ref]" \
+		--to=nobody@example.com \
+		--thread \
+		--nochain-reply-to \
+		$patches $patches |
+	grep "In-Reply-To: "
+'
Thanks, but this is not a very good style, as it won't catch if "git
send-email" dumps core or otherwise fails, exiting with a non-zero status.

Same comments applies to [PATCH 4/6] as well.
OK, this was my first attempt in writing a test and I just used the last
test 'in-reply-to but no threading' as template.

What can be done to make the test better?

[PATCH v2 2/6] add a test for git-send-email for threaded mails without chain-reply-to

From: Markus Heidelberg <hidden>
Date: 2016-06-15 22:46:55

Signed-off-by: Markus Heidelberg <redacted>
---

Markus Heidelberg, 08.06.2009:
Junio C Hamano, 08.06.2009:
quoted
Markus Heidelberg [off-list ref] writes:
quoted
+test_expect_failure 'threading but no chain-reply-to' '
+	git send-email \
+		--dry-run \
+		--from="Example [off-list ref]" \
+		--to=nobody@example.com \
+		--thread \
+		--nochain-reply-to \
+		$patches $patches |
+	grep "In-Reply-To: "
+'
Thanks, but this is not a very good style, as it won't catch if "git
send-email" dumps core or otherwise fails, exiting with a non-zero status.

Same comments applies to [PATCH 4/6] as well.
OK, this was my first attempt in writing a test and I just used the last
test 'in-reply-to but no threading' as template.

What can be done to make the test better?
Is this change sufficient? Dumping the stdout into a file and grepping
this.


 t/t9001-send-email.sh |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index ce26ea4..8f810ab 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -621,4 +621,15 @@ test_expect_success 'in-reply-to but no threading' '
 	grep "In-Reply-To: <in-reply-id@example.com>"
 '
 
+test_expect_failure 'threading but no chain-reply-to' '
+	git send-email \
+		--dry-run \
+		--from="Example <nobody@example.com>" \
+		--to=nobody@example.com \
+		--thread \
+		--nochain-reply-to \
+		$patches $patches >stdout &&
+	grep "In-Reply-To: " stdout
+'
+
 test_done
-- 
1.6.3.2.220.gb421
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help