Skip to content

Commit

Permalink
Fix tests wrt to containerness of Pair.perl
Browse files Browse the repository at this point in the history
Which was changed in 3cbf25e
  • Loading branch information
lizmat committed Jun 29, 2018
1 parent 1175ead commit a291e7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions S02-literals/quoting.t
Expand Up @@ -308,21 +308,25 @@ Note that non-ASCII tests are kept in quoting-unicode.t
# <<:Pair>>
my @q = <<:p(1)>>;
#?niecza todo
is(@q[0].perl, (:p(1)).perl, "pair inside <<>>-quotes - simple");
#?rakudo todo
is(@q[0].perl, :p(1).item.perl, "pair inside <<>>-quotes - simple");
@q = <<:p(1) junk>>;
#?niecza todo
is(@q[0].perl, (:p(1)).perl, "pair inside <<>>-quotes - with some junk");
#?rakudo todo
is(@q[0].perl, :p(1).item.perl, "pair inside <<>>-quotes - with some junk");
is(@q[1], 'junk', "pair inside <<>>-quotes - junk preserved");
@q = <<:def>>;
#?niecza todo
is(@q[0].perl, (:def).perl, ":pair in <<>>-quotes with no explicit value");
#?rakudo todo
is(@q[0].perl, (:def).item.perl, ":pair in <<>>-quotes with no explicit value");
@q = "(EVAL failed)";
try { EVAL '@q = <<:p<moose>>>;' };
#?niecza todo
is(@q[0].perl, (p => "moose").perl, ":pair<anglequoted>");
#?rakudo todo
is(@q[0].perl, (p => "moose").item.perl, ":pair<anglequoted>");
};
{ # weird char escape sequences
Expand Down
4 changes: 2 additions & 2 deletions S02-types/nested_pairs.t
Expand Up @@ -12,7 +12,7 @@ Pair list a la L<"http://www.nntp.perl.org/group/perl.perl6.language/19360">

# L<S32::Containers/Array/=item pairs>

my $list = (1 => (2 => (3 => 4)));
my $list := (1 => (2 => (3 => 4)));
isa-ok($list, Pair);

is($list.key, 1, 'the key is 1');
Expand All @@ -26,7 +26,7 @@ is($list, 1 => 2 => 3 => 4, 'pair operator nests right-associatively');

is($list.perl, '1 => 2 => 3 => 4', 'right-associative nested pairs .perl correctly');

my $r-list = (((1 => 2) => 3) => 4);
my $r-list := (((1 => 2) => 3) => 4);

is($r-list.key, (1 => 2) => 3, 'the key is a nested pair');
is($r-list.key.key, 1 => 2, 'the key of the key is a nested pair');
Expand Down

0 comments on commit a291e7f

Please sign in to comment.