Test cccmd in t9001-send-email.sh and fix two bugs
PATCH 1/1 Test cccmd in t9001-send-email.sh and fix two bugs
For another patch series I'm working on I needed some tests for the cc-cmd feature of git-send-email.
This patch adds 3 tests for the feature, and fix two bugs. The first bug is that the --suppress-cc option for cccmd' was misspelled as ccmd' in the code. The second bug, which is actually found only with my other series, is that the argument to the cccmd is never quoted, so the cccmd would fail with patch file names containing a space.
I also test the possibility to specify --suppress-cc multiple times.
--- git-send-email.perl | 4 +- t/t9001-send-email.sh | 80 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 77 insertions(+), 7 deletions(-)
The patch is on top of maint, but it applies everywhere.
git-send-email.perl +2 -2
@@ -333,7 +333,7 @@ if (@suppress_cc) { } if ($suppress_cc{'all'}) { - foreach my $entry (qw (ccmd cc author self sob body bodycc)) { + foreach my $entry (qw (cccmd cc author self sob body bodyccc)) { $suppress_cc{$entry} = 1; } delete $suppress_cc{'all'};
@@ -1091,7 +1091,7 @@ foreach my $t (@files) { close F; if (defined $cc_cmd && !$suppress_cc{'cccmd'}) { - open(F, "$cc_cmd $t |") + open(F, "$cc_cmd \Q$t\E |") or die "(cc-cmd) Could not execute '$cc_cmd'"; while(<F>) { my $c = $_;
t/t9001-send-email.sh +75 -5
127 lines not on this page · raw message
Signature · 1 line
1.6.0.3