X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Ffilter.t;h=80a7c123ae41078ca42bba187803c4bb9daf6232;hb=f76f265a851944b5dedcc3be5f3b5224b6ebda89;hp=e4f6a2b09ada860fff07b12ed4d8da292610c56d;hpb=c9ea7a39daff28e0c75df8b5853fbd4a9bda6bba;p=public-inbox.git diff --git a/t/filter.t b/t/filter.t index e4f6a2b0..80a7c123 100644 --- a/t/filter.t +++ b/t/filter.t @@ -1,4 +1,4 @@ -# Copyright (C) 2013, Eric Wong and all contributors +# Copyright (C) 2013-2015 all contributors # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt) use strict; use warnings; @@ -85,13 +85,14 @@ sub count_body_parts { 'Content-Type' => 'text/html', Subject => 'HTML only badness', ], - body => "bad body\n", + body => "bad body\r\n\n", ); is(1, PublicInbox::Filter->run($s), "run was a success"); unlike($s->as_string, qr//, "HTML removed"); is("text/plain", $s->header("Content-Type"), "content-type changed"); like($s->body, qr/\A\s*bad body\s*\z/, "body"); + unlike($s->body, qr/\r/, "body has no cr"); like($s->header("X-Content-Filtered-By"), qr/PublicInbox::Filter/, "XCFB header added"); }