X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=t%2F07_bugreport.t;h=22efa238640a4709bec9dfddc2f1633ce7897ebe;hb=c91ad8033e8b7eadc4cd4cfe8e00937617a52fa9;hp=dfc1650c2dfd954df7249cc2f191c7cb6b068072;hpb=0c2305d4c89d165140bc955a50f3248c9c9ba7ad;p=debbugs.git diff --git a/t/07_bugreport.t b/t/07_bugreport.t index dfc1650..22efa23 100644 --- a/t/07_bugreport.t +++ b/t/07_bugreport.t @@ -1,7 +1,7 @@ # -*- mode: cperl;-*- -use Test::More tests => 18; +use Test::More tests => 19; use warnings; use strict; @@ -37,7 +37,9 @@ send_message(to=>'submit@bugs.something', Package: foo Severity: normal -This is a silly bug +This is a silly bug which contains an unescaped From line. + +From line EOF @@ -48,7 +50,7 @@ my $bugreport_cgi_handler = sub { # 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>) { @@ -91,6 +93,8 @@ ok($mech->content() =~ qr/Subject: Submitting a bug/i, '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');