Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (13 sloc) 356 Bytes
use v6;
use Test;
plan 4;
#L<S03/"Smart matching"/Regex Hash hash key grep>
{
my %h = (moep => 'foo', bar => 'baz');
ok (/oep/ ~~ %h), 'Regex ~~ Hash (+,1)';
ok (/bar/ ~~ %h), 'Regex ~~ Hash (+,2)';
ok !(/ugh/ ~~ %h), 'Regex ~~ Hash (-,1)';
ok !(/foo/ ~~ %h), 'Regex ~~ Hash (-,value)';
}
done;
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.