File: 30-xs-optional.t

package info (click to toggle)
libencoding-fixlatin-perl 1.04-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 152 kB
  • sloc: perl: 336; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!perl -T

use strict;
use warnings;

use Test::More;

use Encoding::FixLatin qw(fix_latin);

my $output = eval {
    fix_latin("Caf\xE9");
};

is($@, '', 'no exception when XS module allowed to load');

is($output, "Caf\x{e9}", 'output is as expected');

my $not = $INC{'Encoding/FixLatin/XS.pm'} ? '' : ' not';

ok(1, "XS module was$not found/loaded");

done_testing();