use v6;
use lib 'lib';
use Test;
use Backtrace::AsHTML;

plan 4;

my $html;

my sub foo(Str $arg) {
    my $t = Backtrace.new;
    $html = $t.as-html;
}

my sub bar(Int $arg) {
    foo("bar")
}
bar(2);

like $html, rx{'in block &lt;unit&gt; at t/01-basic.t line 18'};
like $html, rx{'in bar at t/01-basic.t line 18'};
like $html, rx{'in foo at t/01-basic.t line 15'};
like $html, rx{'in new at t/01-basic.t line 11'};

done-testing;


use v6;
use lib 'lib';
use Test;
use Backtrace::AsHTML;

plan 4;

my $html;

my sub foo(Str $arg) {
    my $t = Backtrace.new;
    $html = $t.as-html;
}

my sub bar(Int $arg) {
    foo("bar")
}
bar(2);

like $html, rx{'in block &lt;unit&gt; at t/01-basic.t line 18'};
like $html, rx{'in bar at t/01-basic.t line 18'};
like $html, rx{'in foo at t/01-basic.t line 16'};
like $html, rx{'in new at t/01-basic.t line 11'};

done-testing;


Fix the match in the test
Fix the match in the test

It's a mystery why this just started failing recently as the call
to foo() is indeed at line 16 and doesn't appear to have moved at
all. Ho hum.
