Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 28 lines (20 sloc) 0.752 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
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
Something went wrong with that request. Please try again.