<commit_before># There is no "export" in nqp. So avoid putting subs into Test namespace.
#module Test;

our sub yaml_ok($yaml, $expected, $description, *%adverbs) {
    my $parser := YAML::Tiny.new;
    try {
        my $result := $parser.read_string($yaml);
        is_deeply($expected, $result, $description, todo => %adverbs<todo>);

        CATCH {
            nok(1, "Parse failed '{ $! }'");
        }
    }
}

Q:PIR {
    # We want Test::More features for testing. Not NQP's builtin.
    .include "test_more.pir"
}

# vim: ft=perl6
<commit_msg>Pass too to catched exception handling.<commit_after># There is no "export" in nqp. So avoid putting subs into Test namespace.
#module Test;

our sub yaml_ok($yaml, $expected, $description, *%adverbs) {
    my $parser := YAML::Tiny.new;
    try {
        my $result := $parser.read_string($yaml);
        #_dumper($result);
        is_deeply($expected, $result, $description, todo => %adverbs<todo>);

        CATCH {
            nok(1, "Parse failed '{ $! }'", %adverbs<todo>);
        }
    }
}

Q:PIR {
    # We want Test::More features for testing. Not NQP's builtin.
    .include "test_more.pir"
    load_bytecode "dumper.pbc"
}

# vim: ft=perl6

{'fraction_non_alphanumeric': 0.15058236272878536, 'fraction_numerical': 0.0033277870216306157, 'mean_word_length': 2.855769230769231, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '2827025', 'n_tokens_mistral': 437, 'n_tokens_neox': 423, 'n_words': 113}