# -*- mode: cperl;-*-
-use Test::More tests => 18;
+use Test::More tests => 19;
use warnings;
use strict;
Package: foo
Severity: normal
-This is a silly bug
+This is a silly bug which contains an unescaped From line.
+
+From line
EOF
# I do not understand why this is necessary.
$ENV{DEBBUGS_CONFIG_FILE} = "$config{config_dir}/debbugs_config";
my $fh;
- open($fh,'-|',-e './cgi/version.cgi'? 'perl -I. -T ./cgi/bugreport.cgi' : 'perl -I. -T ../cgi/bugreport.cgi');
+ open($fh,'-|',-e './cgi/version.cgi'? 'perl -Ilib -T ./cgi/bugreport.cgi' : 'perl -Ilib -T ../cgi/bugreport.cgi');
my $headers;
my $status = 200;
while (<$fh>) {
'Subject of bug maibox is right');
ok($mech->content() =~ qr/^From /m,
'Starts with a From appropriately');
+ok($mech->content() =~ qr/^(>F|=46)rom line/m,
+ 'From line escaped appropriately');
$mech->get_ok('http://localhost:'.$port.'/?bug=1;mboxmaint=yes',
'Page received ok');