]> git.donarmstrong.com Git - debbugs.git/blobdiff - t/15_rebuild_indexdb.t
abstract out create config in tests
[debbugs.git] / t / 15_rebuild_indexdb.t
index a3036ecb297dd655a8817510fa5c08a64d4a5e0a..85d7681015e22e13f5e658e07148356b5c734235 100644 (file)
@@ -29,7 +29,7 @@ use Encode qw(decode encode decode_utf8 encode_utf8);
 $SIG{CHLD} = sub {};
 my %config;
 eval {
-     %config = create_debbugs_configuration(debug => exists $ENV{DEBUG}?$ENV{DEBUG}:0);
+     %config = create_debbugs_configuration();
 };
 if ($@) {
      BAIL_OUT($@);
@@ -39,13 +39,7 @@ my $sendmail_dir = $config{sendmail_dir};
 my $spool_dir = $config{spool_dir};
 my $config_dir = $config{config_dir};
 
-END{
-     if ($ENV{DEBUG}) {
-         diag("spool_dir:   $spool_dir\n");
-         diag("config_dir:   $config_dir\n");
-         diag("sendmail_dir: $sendmail_dir\n");
-     }
-}
+
 
 # We're going to use create mime message to create these messages, and
 # then just send them to receive.
@@ -55,7 +49,7 @@ send_message(to=>'submit@bugs.something',
                         From => 'föoff@bugs.something',
                         Subject => 'Submiting a bug',
                        ],
-            body => <<EOF,attachments => [{Type=>"text/plain",Charset=>"utf-8",Data=><<EOF2}]) or fail('Unable to send message');
+            body => <<EOF,attachments => [{Type=>"text/plain",Charset=>"utf-8",Data=>encode_utf8(<<EOF2)}]) or fail('Unable to send message');
 Package: foo
 Severity: normal