]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/blob - t/62-fork-storable.t
Update VPIT::TestHelpers to 15e8aee3
[perl/modules/IPC-MorseSignals.git] / t / 62-fork-storable.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use utf8;
7
8 use Test::More tests => 8;
9
10 use lib 't/lib';
11 use IPC::MorseSignals::TestSuite qw<try init cleanup>;
12
13 *IPC::MorseSignals::TestSuite::diag = *Test::More::diag;
14
15 sub test {
16  my ($desc, @args) = @_;
17  my ($res, $speed, $len);
18  eval {
19   ($res, $speed, $len) = try(@args);
20  };
21  fail($desc . " (died : $@)") if $@;
22  ok($res, $desc . ' (' . $len . ' bits @ ' . $speed . ' bauds)');
23 }
24
25 my @msgs = (
26  \(undef, -273, 1.1, 'yes', '¥€$'),
27  [ 5, 6 ],
28  { hlagh => 1, HLAGH => 2 },
29  { x => -3.573 },
30 );
31 $msgs[7]->{y} = $msgs[7];
32
33 init 6;
34
35 for (1 .. @msgs) {
36  test 'storable ' . $_ => $msgs[$_-1];
37 }
38
39 cleanup;
40