Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (22 sloc) 0.683 kB
use v6;
use Test;
plan 6;
#L<S03/Smart matching/hash value slice truth>
{
my %h = (a => 0, b => 0, c => 1, d => 2);
sub notautoquoted_a { 'a' };
sub notautoquoted_c { 'c' };
#?rakudo todo 'nom regression'
#?niecza todo
ok (%h ~~ .{'c'}), '%hash ~~ .{true"}';
ok !(%h ~~ .{'b'}), '%hash ~~ .{false"}';
ok !(%h ~~ .{notautoquoted_a}), '~~. {notautoquoted_a}';
#?rakudo todo 'nom regression'
#?niecza todo
ok (%h ~~ .{notautoquoted_c}), '~~. {notautoquoted_c}';
#?rakudo todo 'nom regression'
#?niecza todo
ok (%h ~~ .<c>), '%hash ~~ .<true"}';
ok !(%h ~~ .<b>), '%hash ~~ .<false"}';
}
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.