Skip to contentSkip to conversation

Test cccmd in t9001-send-email.sh and fix two bugs

PATCH Superseded Paolo Bonzini 2 participants 2 messages Jun 15, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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
index cccbf45..65a86d9 100755
@@ -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