Fix for Bug 5715, Adding note about ReservesMaxPickUpDelay value
[koha.git] / t / Charset.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 6;
7 BEGIN {
8     use_ok('C4::Charset');
9 }
10
11 my $octets = "abc";
12 ok(IsStringUTF8ish($octets), "verify octets are valid UTF-8 (ASCII)");
13
14 $octets = "flamb\c3\a9";
15 ok(!utf8::is_utf8($octets), "verify that string does not have Perl UTF-8 flag on");
16 ok(IsStringUTF8ish($octets), "verify octets are valid UTF-8 (LATIN SMALL LETTER E WITH ACUTE)");
17 ok(!utf8::is_utf8($octets), "verify that IsStringUTF8ish does not magically turn Perl UTF-8 flag on");
18
19 $octets = "a\xc2" . "c";
20 ok(!IsStringUTF8ish($octets), "verify octets are not valid UTF-8");