~ubuntu-branches/ubuntu/raring/libencode-perl/raring

« back to all changes in this revision

Viewing changes to t/from_to.t

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Rivas
  • Date: 2007-05-18 23:49:27 UTC
  • Revision ID: james.westby@ubuntu.com-20070518234927-bs37c807cty7i1ny
Tags: upstream-2.21
ImportĀ upstreamĀ versionĀ 2.21

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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, '媾';