File: 00300_wideness.t

package info (click to toggle)
libtext-unidecode-perl 1.30-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,236 kB
  • sloc: perl: 3,878; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- coding:utf-8; mode:CPerl -*-
use 5.8.0;  use warnings; use strict;
use Test;
BEGIN {plan tests => 8;}
print q[# // Time-stamp: "2014-06-23 03:42:54 MDT sburke@cpan.org"], "\n";

print "# Checking basic operations with Unicode characters...\n";
      
use utf8;

ok( binmode($_, ':utf8') ) foreach ( *STDERR, *STDIN, *STDOUT );

ok length( "\x{9053}\x{5fb7}\x{7d93}" ), 3;
ok length( "道德經"                    ), 3;

ok "道德經", "\x{9053}\x{5fb7}\x{7d93}" ;

ok "道德經", join( '', chr(0x9053), chr(0x5fb7), chr(0x7d93) );

print "# Bye:\n";
ok 1;

# End