File: 004_slurp.t

package info (click to toggle)
libfile-mmagic-xs-perl 0.09008-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 484 kB
  • sloc: perl: 2,130; ansic: 1,858; makefile: 9; xml: 1
file content (17 lines) | stat: -rw-r--r-- 376 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# https://rt.cpan.org/Public/Bug/Display.html?id=28072
use strict;
use Test::More tests => 2;
use File::MMagic::XS;

{
    local $/ = "\n";
    my $magic = File::MMagic::XS->new();
    is( $magic->get_mime( 't/data/picture.jpg' ), 'image/jpeg' );
}

{
    local $/;
    my $magic = File::MMagic::XS->new();
    is( $magic->get_mime( 't/data/picture.jpg' ), 'image/jpeg' );
}