]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/blobdiff - t/12-unicode.t
Importing IPC-MorseSignals-0.08.tar.gz
[perl/modules/IPC-MorseSignals.git] / t / 12-unicode.t
index 77ce70c40782127c3ac3cad68eaeb7960a5ccdb3..e0cfab38a94ef68d6a71ed6cd269eda1bd9c2e42 100644 (file)
@@ -10,14 +10,20 @@ use utf8;
 use lib 't/lib';
 use IPCMTest qw/try init cleanup/;
 
-init 1;
-
-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');
+sub test {
+ my ($desc, @args) = @_;
+ eval { ok(try(@args), $desc) };
+ fail($desc . " (died : $@)") if $@;
+}
+
+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;