X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F11-ascii.t;h=033c03627d304d61b36664b531dfe6e936590f00;hb=accfcdfb12dc278650d05fed5f14d78291e66d97;hp=b5cc073c012560b3b93afb41041064bfb55b65d7;hpb=8a4a3ba553f81cfdb679c19363f514efb04f29c1;p=perl%2Fmodules%2FIPC-MorseSignals.git diff --git a/t/11-ascii.t b/t/11-ascii.t index b5cc073..033c036 100644 --- a/t/11-ascii.t +++ b/t/11-ascii.t @@ -6,13 +6,19 @@ use warnings; use Test::More tests => 4; use lib 't/lib'; -use IPCMTest qw/try init cleanup/; +use IPC::MorseSignals::TestSuite 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;