1use strict;
2use warnings;
3use Test::More tests => 3;
4use Encode::JP::Mobile;
5use Encode;
6
7# 絵文字のページがかわるごとにエスケープシーケンスによるページきりかえを発生させないといけない。
8
9test_it( "\x{E001}",         qq{\x1B\x24G!\x0F},  'single char' );
10test_it( "\x{E001}\x{E002}", qq{\x1B\x24G!"\x0F}, 'pair char in same page' );
11test_it(
12    "\x{E04A}\x{E20E}\x{E143}",
13    ( "\x1B\x24Gj\x0F" . "\x1B\x24F.\x0F" . "\x1B\x24Ec\x0F" ),
14    "three characters with different page"
15);
16
17sub test_it {
18    my ($uni, $sjis, $name) = @_;
19    is encode("x-sjis-softbank", $uni), $sjis, $name;
20}
21