X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F60-fork-plain.t;h=af36286c55c1f1386bd2c2a453822e5fa8edcd9b;hb=HEAD;hp=54b73a7d5d543e34b07844607690988b7a2aa706;hpb=ddcc7c395d570f0ea20a8e9a242fcbfcc0e49522;p=perl%2Fmodules%2FIPC-MorseSignals.git diff --git a/t/60-fork-plain.t b/t/60-fork-plain.t index 54b73a7..af36286 100644 --- a/t/60-fork-plain.t +++ b/t/60-fork-plain.t @@ -6,20 +6,28 @@ use warnings; use Test::More tests => 7; use lib 't/lib'; -use IPC::MorseSignals::TestSuite qw/try init cleanup/; +use IPC::MorseSignals::TestSuite qw; + +*IPC::MorseSignals::TestSuite::diag = *Test::More::diag; sub test { my ($desc, @args) = @_; - eval { ok(try(@args), $desc) }; + my ($res, $speed, $len); + eval { + ($res, $speed, $len) = try(@args); + }; fail($desc . " (died : $@)") if $@; + ok($res, $desc . ' (' . $len . ' bits @ ' . $speed . ' bauds)'); } -my @msgs = qw/hlagh hlaghlaghlagh HLAGH HLAGHLAGHLAGH \x{0dd0}\x{00} - h\x{00}la\x{00}gh \x{00}\x{ff}\x{ff}\x{00}\x{00}\x{ff}/; +my @msgs = qw; init 6; -test 'plain' => $_ for @msgs; +for (1 .. @msgs) { + test 'plain ' . $_ => $msgs[$_-1]; +} cleanup;