git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC v2 1/5] t9001-send-email: move script creation in a setup test
@ 2015-06-06 16:59 Remi Lespinet
  2015-06-06 16:59 ` [PATCH/RFC v2 2/5] send-email: allow aliases in patch header and command script outputs Remi Lespinet
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Remi Lespinet @ 2015-06-06 16:59 UTC (permalink / raw)
  To: git
  Cc: Remi Galan, Remi Lespinet, Guillaume Pages,
	Louis-Alexandre Stuber, Antoine Delaite, Matthieu Moy

Move the creation of the scripts used in to-cmd and cc-cmd tests
in a setup test to make them available for later tests.

This will be used in the next commit.

Signed-off-by: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>
---
 t/t9001-send-email.sh | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 7be14a4..e63fc83 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -312,13 +312,19 @@ test_expect_success $PREREQ,!AUTOIDENT 'broken implicit ident aborts send-email'
 	)
 '
 
+test_expect_success $PREREQ 'setup tocmd and cccmd scripts' '
+	write_script tocmd-sed <<-\EOF &&
+	sed -n -e "s/^tocmd--//p" "$1"
+	EOF
+	write_script cccmd-sed <<-\EOF
+	sed -n -e "s/^cccmd--//p" "$1"
+	EOF
+'
+
 test_expect_success $PREREQ 'tocmd works' '
 	clean_fake_sendmail &&
 	cp $patches tocmd.patch &&
 	echo tocmd--tocmd@example.com >>tocmd.patch &&
-	write_script tocmd-sed <<-\EOF &&
-	sed -n -e "s/^tocmd--//p" "$1"
-	EOF
 	git send-email \
 		--from="Example <nobody@example.com>" \
 		--to-cmd=./tocmd-sed \
@@ -332,9 +338,6 @@ test_expect_success $PREREQ 'cccmd works' '
 	clean_fake_sendmail &&
 	cp $patches cccmd.patch &&
 	echo "cccmd--  cccmd@example.com" >>cccmd.patch &&
-	write_script cccmd-sed <<-\EOF &&
-	sed -n -e "s/^cccmd--//p" "$1"
-	EOF
 	git send-email \
 		--from="Example <nobody@example.com>" \
 		--to=nobody@example.com \
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-06-08 22:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-06 16:59 [PATCH/RFC v2 1/5] t9001-send-email: move script creation in a setup test Remi Lespinet
2015-06-06 16:59 ` [PATCH/RFC v2 2/5] send-email: allow aliases in patch header and command script outputs Remi Lespinet
2015-06-06 16:59 ` [PATCH/RFC v2 3/5] t9001-send-email: refactor header variable fields replacement Remi Lespinet
2015-06-06 16:59 ` [PATCH/RFC v2 4/5] send-email: allow multiple emails using --cc, --to and --bcc Remi Lespinet
2015-06-06 16:59 ` [PATCH/RFC v2 5/5] send-email: refactor address list process Remi Lespinet
2015-06-08 14:16   ` Matthieu Moy
2015-06-08 16:14     ` Remi Lespinet
2015-06-08 16:21       ` Matthieu Moy
2015-06-08 17:36         ` Remi Lespinet
2015-06-08 18:36     ` Junio C Hamano
2015-06-08 22:12       ` Remi Lespinet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).