Data-JSEmail

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/lib/JSEmailTest.pm
t/data/alternative-html-only.eml
t/data/alternative.eml
t/data/attachment-first.eml
t/data/bad-boundary.eml
t/data/digest.eml
t/data/eai.eml
t/data/encoded-words.eml
t/data/html-only.eml
t/data/mixed-attachments.eml
t/data/no-content-type.eml
t/data/plain.eml
t/data/related.eml
t/data/rfc2231.eml
t/data/rfc822.eml
t/data/spec-4-1-4.eml
t/data/unknown-charset.eml
t/data/unknown-cte.eml
t/hostile.t
META.yml                                 Module YAML meta-data (added by MakeMaker)
META.json                                Module JSON meta-data (added by MakeMaker)

t/corpus.t  view on Meta::CPAN

    text => ['1'], html => ['1'], att => [],
    leaves => { 1 => { charset => 'x-no-such-charset' } },
    values => { 1 => "Plain ASCII under an unknown charset.\n" },
    problem => { 1 => 1 },
  },
  'unknown-cte.eml' => {
    text => ['1'], html => ['1'], att => [],
    values => { 1 => "begin 644 x\n" },
    problem => { 1 => 1 },
  },
  'no-content-type.eml' => {
    # No Content-Type: implicitly text/plain; charset=us-ascii.
    text => ['1'], html => ['1'], att => [],
    leaves => { 1 => { type => 'text/plain', charset => 'us-ascii' } },
    sentAt => undef,
  },
);

for my $file (sort keys %corpus) {
  my $want = $corpus{$file};
  my $m = parse_fixture($file);

t/header-forms.t  view on Meta::CPAN

  ' 7 Nov 2026 10:00:00 GMT'                 => '2026-11-07T10:00:00Z',
  ' Sat, 07 Nov 2026 10:00:00 EST'           => '2026-11-07T10:00:00-05:00',
  ' Sat, 07 Nov 26 10:00:00 +0000'           => '2026-11-07T10:00:00Z',
  ' Mon, 30 Feb 2026 10:00:00 +0000'         => undef,
  ' yesterday'                               => undef,
  ' '                                        => undef,
);
for my $in (sort keys %dates) {
  is(form(asDate => $in), $dates{$in}, "Date: '$in'");
}
is(prop_value(parse_fixture('no-content-type.eml')->{headers}, 'header:Date:asDate'), undef,
  'Date: invalid Date header is null');

# --- S4.1.2.7 URLs --------------------------------------------------------

is_deeply(form(asURLs => ' <http://example.com/help>, <mailto:list@example.com?subject=help> (Help)'),
  [ 'http://example.com/help', 'mailto:list@example.com?subject=help' ], 'URLs: brackets and comments removed');
is_deeply(form(asURLs => qq{ <http://a.example/>,\r\n <mailto:b\@example.com>}),
  [ 'http://a.example/', 'mailto:b@example.com' ], 'URLs: folded list');
is(form(asURLs => ' NO (posting not allowed)'), undef, 'URLs: RFC 2369 "NO" is not a URL list');
is(form(asURLs => ' '), undef, 'URLs: empty is null');



( run in 1.750 second using v1.01-cache-2.11-cpan-99fa8243a42 )