<commit_before>use v6;
use lib $?FILE.IO.parent(2).add('packages');
use Test;
use Test::Helpers;

plan 3;

{ # Make sure CLIENT:: works for code invoked from NQP world
    # Wether or not a code object is invoked by Raku or NQP code is pretty much implementation specific. Moreover,
    # the chosen PseudoStash path `CALLER::CLIENT::CLIENT::` also depends on how COERCE method is invoked by Rakudo.
    # Therefore any changes related to coercion protocol implementation may require tweking of this test.
    for <c d e.PREVIEW> -> $rev {
        is-run "use v6.$rev;\nmy \$foo = q<This is 6.$rev>;\n"
                ~ q:to/TEST-CODE/,
                    my class C {
                        method COERCE(Int $v) {
                            print CALLER::CLIENT::CLIENT::MY::<$foo>;
                            C.new;
                        }
                    }
                    C(42);
                    TEST-CODE
                "CLIENT:: doesn't fail on NQP packages for 6.$rev",
                :out("This is 6.$rev"),
                :err("");
    }
}

done-testing;<commit_msg>Win* compatibility fix<commit_after>use v6;
use lib $?FILE.IO.parent(2).add('packages');
use Test;
use Test::Helpers;

plan 3;

{ # Make sure CLIENT:: works for code invoked from NQP world
    # Wether or not a code object is invoked by Raku or NQP code is pretty much implementation specific. Moreover,
    # the chosen PseudoStash path `CALLER::CLIENT::CLIENT::` also depends on how COERCE method is invoked by Rakudo.
    # Therefore any changes related to coercion protocol implementation may require tweking of this test.
    for <c d e.PREVIEW> -> $rev {
        is-run "use v6.$rev;\nmy \$foo = q<This is 6.$rev>;\n"
                ~ q:to/TEST-CODE/,
                    my class C {
                        method COERCE(Int $v) {
                            print CALLER::CLIENT::CLIENT::MY::<$foo>;
                            C.new;
                        }
                    };
                    C(42);
                    TEST-CODE
                "CLIENT:: doesn't fail on NQP packages for 6.$rev",
                :out("This is 6.$rev"),
                :err("");
    }
}

done-testing;
{'fraction_non_alphanumeric': 0.10980036297640654, 'fraction_numerical': 0.008166969147005444, 'mean_word_length': 1.6094674556213018, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '7530628', 'n_tokens_mistral': 648, 'n_tokens_neox': 612, 'n_words': 213}