]> git.donarmstrong.com Git - debbugs.git/blobdiff - t/lib/DebbugsTest.pm
support attachments in test scripts
[debbugs.git] / t / lib / DebbugsTest.pm
index e45d7db1e996f7832b8373777fb245918781e44f..253f1d7acbe61f9d5dedae7cd549299f5560dcf0 100644 (file)
@@ -93,7 +93,7 @@ END
 foo main foo
 END
                            "$config_dir/pseudo-packages.description" => '',
-                           "$config_dir/pseudo-packages.maint" => '',
+                           "$config_dir/pseudo-packages.maintainers" => '',
                           );
      while (my ($file,$contents) = each %files_to_create) {
          system('mkdir','-p',dirname($file));
@@ -145,6 +145,9 @@ sub send_message{
                                                     },
                                          body    => {type => SCALAR,
                                                     },
+                                         attachments => {type => ARRAYREF,
+                                                         default => [],
+                                                        },
                                          run_processall =>{type => BOOLEAN,
                                                            default => 1,
                                                           },
@@ -158,7 +161,9 @@ sub send_message{
      my $pid = open3($wfd,$rfd,$rfd,'scripts/receive')
          or die "Unable to start receive: $!";
      print {$wfd} create_mime_message($param{headers},
-                                        $param{body}) or die "Unable to to print to receive";
+                                     $param{body},
+                                     $param{attachments}) or
+                                         die "Unable to to print to receive";
      close($wfd) or die "Unable to close receive";
      my $err = $? >> 8;
      my $childpid = waitpid($pid,0);