File Coverage

File:t/Charset.t
Coverage:100.0%

linestmtbrancondsubtimecode
1#!/usr/bin/perl
2
3
1
1
1
1.33283521062197e+15
14
37
use strict;
4
1
1
1
15
12
46
use warnings;
5
6
1
1
1
297
19289
38
use Test::More tests => 6;
7BEGIN {
8
1
1569
    use_ok('C4::Charset');
9}
10
11
1
245583
my $octets = "abc";
12
1
33
ok(IsStringUTF8ish($octets), "verify octets are valid UTF-8 (ASCII)");
13
14
1
726
$octets = "flamb\c3\a9";
15
1
23
ok(!utf8::is_utf8($octets), "verify that string does not have Perl UTF-8 flag on");
16
1
523
ok(IsStringUTF8ish($octets), "verify octets are valid UTF-8 (LATIN SMALL LETTER E WITH ACUTE)");
17
1
489
ok(!utf8::is_utf8($octets), "verify that IsStringUTF8ish does not magically turn Perl UTF-8 flag on");
18
19
1
470
$octets = "a\xc2" . "c";
20
1
13
ok(!IsStringUTF8ish($octets), "verify octets are not valid UTF-8");