X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FIPC-MorseSignals.git;a=blobdiff_plain;f=t%2F11-ascii.t;h=a9b6d69350763d2272a39b8c1f82a32da15f94b2;hp=b5cc073c012560b3b93afb41041064bfb55b65d7;hb=f92bbcf77fb757c6655f4611c900c49ed178f27e;hpb=8a4a3ba553f81cfdb679c19363f514efb04f29c1 diff --git a/t/11-ascii.t b/t/11-ascii.t index b5cc073..a9b6d69 100644 --- a/t/11-ascii.t +++ b/t/11-ascii.t @@ -8,11 +8,17 @@ use Test::More tests => 4; use lib 't/lib'; use IPCMTest qw/try init cleanup/; -init; +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'); +init 12; + +test 'ascii' => 'hello'; +test 'few bits' => "\0" x 5; +test 'lots of bits' => "\x{FF}" x 5; +test 'null character' => "a\0b"; cleanup;