Support building nonxs extensions from cpan/ on Unix.
[perl.git] / ext / Encode / t / from_to.t
1 # $Id: from_to.t,v 1.1 2006/01/15 15:06:36 dankogai Exp $
2 use strict;
3 use Test::More tests => 3;
4 use Encode qw(encode from_to);
5
6 my $foo = encode("utf-8", "\x{5abe}");
7 from_to($foo, "utf-8" => "latin1", Encode::FB_HTMLCREF);
8 ok !Encode::is_utf8($foo);
9 is $foo, '媾';
10
11 my $bar = encode("latin-1", "\x{5abe}", Encode::FB_HTMLCREF);
12 is $bar, '媾';