]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/blobdiff - t/12-unicode.t
Importing IPC-MorseSignals-0.09.tar.gz
[perl/modules/IPC-MorseSignals.git] / t / 12-unicode.t
index 77ce70c40782127c3ac3cad68eaeb7960a5ccdb3..710231127e29ea33e4c5b74f85b10a213c2e8d9f 100644 (file)
@@ -8,16 +8,22 @@ use Test::More tests => 7;
 use utf8;
 
 use lib 't/lib';
-use IPCMTest qw/try init cleanup/;
+use IPC::MorseSignals::TestSuite qw/try init cleanup/;
 
-init 1;
+sub test {
+ my ($desc, @args) = @_;
+ eval { ok(try(@args), $desc) };
+ fail($desc . " (died : $@)") if $@;
+}
 
-ok(try('hello'), 'ascii');
-ok(try("\0" x 5), 'few bits');
-ok(try("\x{FF}" x 5), 'lots of bits');
-ok(try("a\0b"), 'null character');
-ok(try('éàùçà'), 'extended');
-ok(try('€€€'), 'unicode');
-ok(try('à€béd'), 'mixed');
+init 21;
+
+test 'ascii'          => 'hello';
+test 'few bits'       => "\0" x 5;
+test 'lots of bits'   => "\x{FF}" x 5;
+test 'null character' => "a\0b";
+test 'extended'       => 'éàùçà';
+test 'unicode'        => '€€€';
+test 'mixed'          => 'à€béd';
 
 cleanup;