Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (12 sloc) 420 Bytes
use v6;
use Test;
use lib 'lib';
use MIME::Types;
my $mime = MIME::Types.new('./doc/mime.types');
plan 5;
is $mime.type('txt'), 'text/plain', 'Get a simple type';
is $mime.type('svg'), 'image/svg+xml', 'Get a + type';
my @known = $mime.extensions('application/vnd.ms-excel');
is @known[0], 'xls', 'Get extensions, first';
is @known[1], 'xlb', 'Get extensions, second';
is @known[2], 'xlt', 'Get extensions, third';