File: ct-header.t

package info (click to toggle)
libemail-simple-perl 2.218-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 336 kB
  • sloc: perl: 462; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 775 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use v5.12.0;
use warnings;

use Test::More tests => 2;

use Email::Simple;

# This asinine exception is made for Lotus Notes sending to Outlook.  When
# reconstituting this value (created by Lotus Notes), Outlook becomes unable to
# locate the MIME boundary.  The proper fix would be to note structure fields
# and analyze and reformat them correctly.  Fat chance.  -- rjbs, 2006-11-27

my $ct_text = qq{Content-Type: multipart/alternative; boundary="=_alternative 0065F3338525722E_="\n};

{
  my $count = my @lines = split /\n/, $ct_text;
  is($count, 1, "we start with one line (Content-Type header)");
}

{
  my $email = Email::Simple->new($ct_text);
  my $count = my @lines = split /\n/, $email->as_string;
  is($count, 1, "we end with one, because C-T doesn't wrap");
}