File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ test_description='git send-email'
6
6
# May be altered later in the test
7
7
PREREQ=" PERL"
8
8
9
+ replace_variable_fields () {
10
+ sed -e " s/^\(Date:\).*/\1 DATE-STRING/" \
11
+ -e " s/^\(Message-Id:\).*/\1 MESSAGE-ID-STRING/" \
12
+ -e " s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/"
13
+ }
14
+
9
15
test_expect_success $PREREQ ' prepare reference tree' '
10
16
echo "1A quick brown fox jumps over the" >file &&
11
17
echo "lazy dog" >>file &&
@@ -296,10 +302,7 @@ test_expect_success $PREREQ 'Show all headers' '
296
302
297
303
--in-reply-to="<[email protected] >" \
298
304
--smtp-server relay.example.com \
299
- $patches |
300
- sed -e "s/^\(Date:\).*/\1 DATE-STRING/" \
301
- -e "s/^\(Message-Id:\).*/\1 MESSAGE-ID-STRING/" \
302
- -e "s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/" \
305
+ $patches | replace_variable_fields \
303
306
>actual-show-all-headers &&
304
307
test_cmp expected-show-all-headers actual-show-all-headers
305
308
'
@@ -554,12 +557,6 @@ Result: OK
554
557
EOF
555
558
"
556
559
557
- replace_variable_fields () {
558
- sed -e " s/^\(Date:\).*/\1 DATE-STRING/" \
559
- -e " s/^\(Message-Id:\).*/\1 MESSAGE-ID-STRING/" \
560
- -e " s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/"
561
- }
562
-
563
560
test_suppression () {
564
561
git send-email \
565
562
--dry-run \
You can’t perform that action at this time.
0 commit comments