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 25 lines (20 sloc) 0.608 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
use v6;
use Test;
plan 6;

#L<S03/"Smart matching"/Array Hash hash slice existence>
{
    my %h = (a => 'b', c => Mu);
    #?pugs todo
    ok (['a'] ~~ %h), 'Array ~~ Hash (exists and True)';
    #?pugs todo
    ok (['c'] ~~ %h), 'Array ~~ Hash (exists but Mu)';
    #?pugs todo
    ok ([<a c>] ~~ %h), 'Array ~~ Hash (both exist)';
    #?pugs todo
    ok ([<c d>] ~~ %h), 'Array ~~ Hash (one exists)';
    # note that ?any() evaluates to False
    ok !( () ~~ %h), 'Array ~~ Hash (empty list)';
    ok !(['e'] ~~ %h), 'Array ~~ Hash (not exists)';

}

done;

# vim: ft=perl6
Something went wrong with that request. Please try again.