Acme-Unicodify
view release on metacpan or search on metacpan
t/01-ToFromUnicode.t view on Meta::CPAN
'to_unicode() handles undef'
);
is(
$unify->back_to_ascii(undef),
undef,
'back_to_ascii() handles undef'
);
my $text = <<'END_FILE';
This is a test. I want to throw in a bogus Unicode character just to validate that it is preserved.
This is line 2
This is a camel: \x{1F42A}
It should stay a camel.
END_FILE
$text = "
This is a test. I want to throw in a bogus Unicode character just to validate that it is preserved.
This is line 2
This is a camel: \x{1F42A}
It should stay a camel.";
write_text($dir . '/infile.txt', $text);
$unify->file_to_unicode($dir . '/infile.txt', $dir . '/unifile.txt');
my $textin = read_text($dir . '/infile.txt');
my $text1 = read_text($dir . '/unifile.txt');
isnt($text, $text1, 'Unicoded file does not match non-unicoded file');
( run in 0.479 second using v1.01-cache-2.11-cpan-4d50c553e7e )