|
Lines 17-29
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 10; |
20 |
use Test::More tests => 15; |
| 21 |
use MARC::Record; |
21 |
use MARC::Record; |
| 22 |
|
22 |
|
| 23 |
BEGIN { |
23 |
BEGIN { |
| 24 |
use_ok('C4::Charset'); |
24 |
use_ok('C4::Charset'); |
| 25 |
} |
25 |
} |
| 26 |
|
26 |
|
|
|
27 |
my $string; |
| 28 |
ok(!defined(NormalizeString($string,undef,1)),'Uninitialized string case 1 normalizes to uninitialized string.'); |
| 29 |
|
| 30 |
$string = 'Sample'; |
| 31 |
ok(defined(NormalizeString($string,undef,0)), 'Initialized string case 1 normalizes to some string.'); |
| 32 |
ok(defined(NormalizeString($string,undef,1)), 'Initialized string case 2 normalizes to some string.'); |
| 33 |
ok(defined(NormalizeString($string,1,0)), 'Initialized string case 3 normalizes to some string.'); |
| 34 |
ok(defined(NormalizeString($string,1,1)), 'Initialized string case 4 normalizes to some string.'); |
| 35 |
|
| 27 |
my $octets = "abc"; |
36 |
my $octets = "abc"; |
| 28 |
ok(IsStringUTF8ish($octets), "verify octets are valid UTF-8 (ASCII)"); |
37 |
ok(IsStringUTF8ish($octets), "verify octets are valid UTF-8 (ASCII)"); |
| 29 |
|
38 |
|
| 30 |
- |
|
|