X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F60-fork-plain.t;h=043e99e35f7f0604eeab83a1f598b6e8c9d92b0c;hb=546e7c4c2185a46d1054c149cf9ba52337853537;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..043e99e 100644 --- a/t/60-fork-plain.t +++ b/t/60-fork-plain.t @@ -8,10 +8,16 @@ use Test::More tests => 7; use lib 't/lib'; use IPC::MorseSignals::TestSuite qw/try init cleanup/; +*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} @@ -19,7 +25,9 @@ my @msgs = qw/hlagh hlaghlaghlagh HLAGH HLAGHLAGHLAGH \x{0dd0}\x{00} init 6; -test 'plain' => $_ for @msgs; +for (1 .. @msgs) { + test 'plain ' . $_ => $msgs[$_-1]; +} cleanup;