]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/blobdiff - t/11-ascii.t
Importing IPC-MorseSignals-0.08.tar.gz
[perl/modules/IPC-MorseSignals.git] / t / 11-ascii.t
index b5cc073c012560b3b93afb41041064bfb55b65d7..a9b6d69350763d2272a39b8c1f82a32da15f94b2 100644 (file)
@@ -8,11 +8,17 @@ use Test::More tests => 4;
 use lib 't/lib';
 use IPCMTest 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;