]> git.donarmstrong.com Git - debbugs.git/commitdiff
support attachments in test scripts
authorDon Armstrong <don@donarmstrong.com>
Sun, 8 Jul 2012 00:42:55 +0000 (17:42 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 8 Jul 2012 00:42:55 +0000 (17:42 -0700)
t/lib/DebbugsTest.pm

index 4e510f6af3a8bcd3debcba17f800fc8c6894a661..253f1d7acbe61f9d5dedae7cd549299f5560dcf0 100644 (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);