X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FIPC-MorseSignals.git;a=blobdiff_plain;f=t%2F12-unicode.t;h=e0cfab38a94ef68d6a71ed6cd269eda1bd9c2e42;hp=77ce70c40782127c3ac3cad68eaeb7960a5ccdb3;hb=f92bbcf77fb757c6655f4611c900c49ed178f27e;hpb=8a4a3ba553f81cfdb679c19363f514efb04f29c1 diff --git a/t/12-unicode.t b/t/12-unicode.t index 77ce70c..e0cfab3 100644 --- a/t/12-unicode.t +++ b/t/12-unicode.t @@ -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;