File: 101_compat_extmagic.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 (15 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# perl-test
# $Id: 02-extmagic.t,v 1.3 2003/11/21 02:25:52 knok Exp $

use strict;
use Test::More (tests => 2);

BEGIN
{
    use_ok("File::MMagic::XS", qw(:compat));
}

my $magic = File::MMagic::XS->new();
$magic->addMagicEntry("0\tstring\t#\\ perl-test\tapplication/x-perl-test");
my $ret = $magic->checktype_filename(__FILE__);
is($ret, 'application/x-perl-test');