Merge branch 'cl/t9001-cleanup' into maint

Test clean-up.

* cl/t9001-cleanup:
  t9001: use existing helper in send-email test
This commit is contained in:
Junio C Hamano 2018-03-22 14:24:13 -07:00
commit b1bdf46bb8

View File

@ -6,6 +6,12 @@ test_description='git send-email'
# May be altered later in the test # May be altered later in the test
PREREQ="PERL" PREREQ="PERL"
replace_variable_fields () {
sed -e "s/^\(Date:\).*/\1 DATE-STRING/" \
-e "s/^\(Message-Id:\).*/\1 MESSAGE-ID-STRING/" \
-e "s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/"
}
test_expect_success $PREREQ 'prepare reference tree' ' test_expect_success $PREREQ 'prepare reference tree' '
echo "1A quick brown fox jumps over the" >file && echo "1A quick brown fox jumps over the" >file &&
echo "lazy dog" >>file && echo "lazy dog" >>file &&
@ -296,10 +302,7 @@ test_expect_success $PREREQ 'Show all headers' '
--bcc=bcc@example.com \ --bcc=bcc@example.com \
--in-reply-to="<unique-message-id@example.com>" \ --in-reply-to="<unique-message-id@example.com>" \
--smtp-server relay.example.com \ --smtp-server relay.example.com \
$patches | $patches | replace_variable_fields \
sed -e "s/^\(Date:\).*/\1 DATE-STRING/" \
-e "s/^\(Message-Id:\).*/\1 MESSAGE-ID-STRING/" \
-e "s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/" \
>actual-show-all-headers && >actual-show-all-headers &&
test_cmp expected-show-all-headers actual-show-all-headers test_cmp expected-show-all-headers actual-show-all-headers
' '
@ -554,12 +557,6 @@ Result: OK
EOF EOF
" "
replace_variable_fields () {
sed -e "s/^\(Date:\).*/\1 DATE-STRING/" \
-e "s/^\(Message-Id:\).*/\1 MESSAGE-ID-STRING/" \
-e "s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/"
}
test_suppression () { test_suppression () {
git send-email \ git send-email \
--dry-run \ --dry-run \