view t/02-rakudo/15-gh_1202.t @ 0:c341f82e7ad7 default tip

Rakudo branch in cr.ie.u-ryukyu.ac.jp
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 26 Dec 2019 16:50:27 +0900
parents
children
line wrap: on
line source

use v6;
use Test;

# GH#1202

plan 2;

my Bool $complete = False;

await Promise.anyof(
    start {
        my $out = "";
        # This was a bug with unpredictable output. Hopefully 50 repetiotions is enough to make sure everything works.
        for ^50 -> $rep {
            my $proc = run $*EXECUTABLE.absolute, '-e', q<await (^5).map({start { print qqx{echo $_} } })>, :out;
            $out ~= $proc.out.slurp(:close);
        }
        like $out, /[ <[0..4]> \n ] ** 250/, "shell output";
        $complete = True;
    },
    Promise.in(600), # 10mins timeout
);

ok $complete, "all runs completed";

# vim: ft=perl6 sw=4