]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/blob - t/12-unicode.t
Importing IPC-MorseSignals-0.09.tar.gz
[perl/modules/IPC-MorseSignals.git] / t / 12-unicode.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 7;
7
8 use utf8;
9
10 use lib 't/lib';
11 use IPC::MorseSignals::TestSuite qw/try init cleanup/;
12
13 sub test {
14  my ($desc, @args) = @_;
15  eval { ok(try(@args), $desc) };
16  fail($desc . " (died : $@)") if $@;
17 }
18
19 init 21;
20
21 test 'ascii'          => 'hello';
22 test 'few bits'       => "\0" x 5;
23 test 'lots of bits'   => "\x{FF}" x 5;
24 test 'null character' => "a\0b";
25 test 'extended'       => 'éàùçà';
26 test 'unicode'        => '€€€';
27 test 'mixed'          => 'à€béd';
28
29 cleanup;