Permalink
Browse files

[t/spec] tests for RT #63126 Junctions in array and hash indices dont…

… work in Rakudo

git-svn-id: http://svn.pugscode.org/pugs@31511 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
bbkr
bbkr committed Jun 30, 2010
1 parent f9633f2 commit 09302fd176cc22d004b5b55969430a2b2e72cfe0
Showing with 15 additions and 0 deletions.
  1. +15 −0 S03-junctions/misc.t
View
@@ -400,6 +400,21 @@ ok Mu & Mu ~~ Mu, 'Mu & Mu ~~ Mu works';
my @x = (6,7,8);
jok(5 < @x.all, '.all method works on array objects');
}
+
+# RT #63126
+{
+ my @a = "foo", "foot";
+ ok @a[all(0,1)] ~~ /^foo/,
+ 'junction can be used to index Array';
+
+ my %h = (
+ "0" => "foo",
+ "1" => "foot"
+ );
+ ok %h{all(0,1)} ~~ /^foo/,
+ 'junction can be used to index Hash';
+}
+
done_testing();
# vim: ft=perl6

0 comments on commit 09302fd

Please sign in to comment.