Help language development. Donate to The Perl Foundation

Log::Async cpan:BDUGGAN last updated on 2022-03-14

t/07-done.t
use v6;
use Test;
use lib 'lib';
use Log::Async;

plan 2;

my $out = "";
$*OUT = $*OUT but role { method say($arg) { $out ~= $arg } };
set-logger(Log::Async.new);
logger.send-to($*OUT);

info 'first';
info 'second';

logger.done;

like $out, /first/, 'found first in output';
like $out, /second/, 'found second in output';