<commit_before>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;
<commit_msg>The Backtrace.new doesn't appear in backtrace frames<commit_after>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'};

done-testing;

{'fraction_non_alphanumeric': 0.18261826182618263, 'fraction_numerical': 0.0374037403740374, 'mean_word_length': 3.527363184079602, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4957910', 'n_tokens_mistral': 415, 'n_tokens_neox': 390, 'n_words': 122}