<commit_before>unit class Test-Files;

method files() {
    my @files;

    if @*ARGS {
        @files = @*ARGS;
    } else {
        if %*ENV<TEST_FILES> {
            @files = %*ENV<TEST_FILES>.trim.split(' ').grep(*.IO.e);
        } else {
            @files = qx<git ls-files>.lines;
        }
    }
    return @files;
}

method pods() {
    return $.files.grep({$_.ends-with: '.pod6'})
}

method documents() {
    return $.files.grep({$_.ends-with: '.pod6' or $_.ends-with: '.md'})
}

# vim: expandtab shiftwidth=4 ft=perl6
<commit_msg>Also split TEST_FILES on newlines<commit_after>unit class Test-Files;

method files() {
    my @files;

    if @*ARGS {
        @files = @*ARGS;
    } else {
        if %*ENV<TEST_FILES> {
            @files = %*ENV<TEST_FILES>.trim.split(/ \n/).grep(*.IO.e);
        } else {
            @files = qx<git ls-files>.lines;
        }
    }
    return @files;
}

method pods() {
    return $.files.grep({$_.ends-with: '.pod6'})
}

method documents() {
    return $.files.grep({$_.ends-with: '.pod6' or $_.ends-with: '.md'})
}

# vim: expandtab shiftwidth=4 ft=perl6

{'fraction_non_alphanumeric': 0.1911231884057971, 'fraction_numerical': 0.007246376811594203, 'mean_word_length': 2.2122093023255816, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1502722', 'n_tokens_mistral': 430, 'n_tokens_neox': 415, 'n_words': 84}