X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=t%2F07_bugreport.t;h=6af469195a8cb5b2e86d0442331a0182046cee44;hb=refs%2Fheads%2Fdebian;hp=c1438c276888711bb4cab8eec14f00131bf25a50;hpb=a40fd8e928b333287f7f52f590c8e2d0c2f90821;p=debbugs.git diff --git a/t/07_bugreport.t b/t/07_bugreport.t index c1438c2..6af4691 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; @@ -24,13 +24,8 @@ use HTTP::Status qw(RC_NOT_MODIFIED); use lib qw(t/lib); use DebbugsTest qw(:all); -my %config; -eval { - %config = create_debbugs_configuration(); -}; -if ($@) { - BAIL_OUT($@); -} +my %config = create_debbugs_configuration(); + # create a bug send_message(to=>'submit@bugs.something', @@ -42,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 @@ -96,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');