Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t9001-send-email: move script creation in a setup test
author
Remi Lespinet
<remi.lespinet@ensimag.grenoble-inp.fr>
Tue, 30 Jun 2015 12:16:42 +0000
(14:16 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 30 Jun 2015 18:29:18 +0000
(11:29 -0700)
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.
Signed-off-by: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9001-send-email.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
7974889
)
diff --git
a/t/t9001-send-email.sh
b/t/t9001-send-email.sh
index 7be14a4e37f7843d9a9863a21e9181ffeceee11b..e63fc8376be628572353499ae6b98161c2007ee6 100755
(executable)
--- 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 &&
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 \
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 &&
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 \
git send-email \
--from="Example <nobody@example.com>" \
--to=nobody@example.com \