<commit_before>use v6;
use Test;

# L<S04/Statement parsing/the hash list operator>

plan 7;

isa_ok hash('a', 1), Hash, 'hash() returns a Hash';
is hash('a', 1).keys, 'a', 'hash() with keys/values (key)';
#?pugs todo
is hash('a', 1).values, 1, 'hash() with keys/values (values)';

is hash('a' => 1).keys, 'a', 'hash() with pair (key)';
#?pugs todo
is hash('a' => 1).values, 1, 'hash() with pair (values)';

#?pugs 2 skip 'Named argument found where no matched parameter expected'
is hash(a => 1).keys, 'a', 'hash() with autoquoted pair (key)';
is hash(a => 1).values, 1, 'hash() with autoquoted pair (values)';

# vim: ft=perl6<commit_msg>Add test for RT #78096<commit_after>use v6;
use Test;

# L<S04/Statement parsing/the hash list operator>

plan 8;

isa_ok hash('a', 1), Hash, 'hash() returns a Hash';
is hash('a', 1).keys, 'a', 'hash() with keys/values (key)';
#?pugs todo
is hash('a', 1).values, 1, 'hash() with keys/values (values)';

is hash('a' => 1).keys, 'a', 'hash() with pair (key)';
#?pugs todo
is hash('a' => 1).values, 1, 'hash() with pair (values)';

#?pugs 2 skip 'Named argument found where no matched parameter expected'
is hash(a => 1).keys, 'a', 'hash() with autoquoted pair (key)';
is hash(a => 1).values, 1, 'hash() with autoquoted pair (values)';

#RT #78096
{
    lives_ok { my @r=2..10,<j q k a>;my %v=j=>10,q=>10,k=>10,a=>1|11;},
        "q => doesn't trigger quoting construct";
}

# vim: ft=perl6
{'fraction_non_alphanumeric': 0.21093202522775054, 'fraction_numerical': 0.0378416257883672, 'mean_word_length': 4.666666666666667, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 19, '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': '941221', 'n_tokens_mistral': 593, 'n_tokens_neox': 550, 'n_words': 189}