summaryrefslogtreecommitdiff
path: root/cpan/dist/Unicode-Japanese/t/wavedash.t
blob: a4f37ac2b94c913a1ecef4b74c133303b29dfa09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## ----------------------------------------------------------------------------
#  t/wavedash.t
# -----------------------------------------------------------------------------
# Mastering programed by YAMASHINA Hio
#
# Copyright YMIRLINK,Inc.
# -----------------------------------------------------------------------------
# $Id$
# -----------------------------------------------------------------------------
use strict;

use Test::More tests => 4;
use Unicode::Japanese;

# -----------------------------------------------------------------------------
# U+301C(WAVE DASH) => CP912:8160
#
is(Unicode::Japanese->new("\xe3\x80\x9c")->sjis(),
   "\x81\x60",
   "U+301C => CP912:8160");
is(Unicode::Japanese::PurePerl->new("\xe3\x80\x9c")->sjis(),
   "\x81\x60",
   "U+301C => CP912:8160");

# -----------------------------------------------------------------------------
# U+301C(WAVE DASH) =(z2h)=> ASCII:7E (TILDE)
#
is(Unicode::Japanese->new("\xe3\x80\x9c")->z2h()->sjis(),
   "~",
   "U+301C => CP912:8160");
is(Unicode::Japanese::PurePerl->new("\xe3\x80\x9c")->z2h()->sjis(),
   "~",
   "U+301C => CP912:8160");

# -----------------------------------------------------------------------------
# End Of File.
# -----------------------------------------------------------------------------