8 use Test::More tests => 10;
10 use IPC::MorseSignals::Emitter;
11 use IPC::MorseSignals::Receiver;
14 \(undef, -273, 1.4159, 'yes', '¥€$'),
16 { hlagh => 1, HLAGH => 2 },
17 { lol => [ 'bleh', undef, 4684324 ] },
19 $msgs[7]->{wut} = { dong => [ 0 .. 9 ], recurse => $msgs[7] };
22 my $deuce = IPC::MorseSignals::Emitter->new(speed => 1024);
23 my $pants = IPC::MorseSignals::Receiver->new(\%SIG, done => sub {
24 my $cur = shift @msgs;
25 is_deeply($_[1], $cur, 'got object ' . $i++);
28 $deuce->post($_) for @msgs;
31 ok(!$deuce->busy, 'emitter is no longer busy after all the messages have been sent');
32 ok(!$pants->busy, 'receiver is no longer busy after all the messages have been got');
34 ok(0, 'didn\'t got object ' . $i++) for @msgs;