File: obfuscated-zip.t

package info (click to toggle)
libmime-tools-perl 5.515-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,612 kB
  • sloc: perl: 6,349; makefile: 8
file content (18 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;

use Test::More tests => 2;

# Handle a missing type in the Content-Type: header

use MIME::Parser;
my $parser = MIME::Parser->new();
$parser->output_to_core(0);
$parser->output_under("testout");
my $entity = $parser->parse_open("testmsgs/malformed-content-type-zip.msg");

is(scalar($entity->parts), 2, 'Entity has two parts');
is($entity->parts(1)->head->mime_attr('content-type.name'), 'payroll_report_429047_10092013.zip', 'Got expected attachment name');

1;