use lib 't/lib';
use IPCMTest qw/try init cleanup/;
-init 1;
-
-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');
-ok(try('éàùçà'), 'extended');
-ok(try('€€€'), 'unicode');
-ok(try('à€béd'), 'mixed');
+sub test {
+ my ($desc, @args) = @_;
+ eval { ok(try(@args), $desc) };
+ fail($desc . " (died : $@)") if $@;
+}
+
+init 21;
+
+test 'ascii' => 'hello';
+test 'few bits' => "\0" x 5;
+test 'lots of bits' => "\x{FF}" x 5;
+test 'null character' => "a\0b";
+test 'extended' => 'éàùçà';
+test 'unicode' => '€€€';
+test 'mixed' => 'à€béd';
cleanup;