Permalink
Browse files

[spectest] Unskip a test for Rakudo, and remove some tests for the no…

…w-removed sub fallback semantics.

git-svn-id: http://svn.pugscode.org/pugs@21615 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
jnthn
jnthn committed Jul 29, 2008
1 parent ba0b457 commit 5a882b3cd33f75750cd9b746b791d2b75c35f98a
Showing with 4 additions and 33 deletions.
  1. +4 −33 S04-statements/for.t
View
@@ -11,7 +11,7 @@ for statement as possible
=end description
-plan 42;
+plan 39;
## No foreach
# L<S04/The C<for> statement/"no foreach statement any more">
@@ -79,25 +79,17 @@ plan 42;
is($f, '012345', 'for () -> {} works');
}
-# ... with referential sub
-#?rakudo skip 'implicit invocant'
-{
- my $h;
- sub some_sub_2 ($arg) { $h = $h ~ $arg; };
- for (0 .. 5) { .some_sub_2 };
- is($h, '012345', 'for (0 .. 5) { .some_sub } works');
-}
-
# ... with implicit topic
-#?rakudo skip 'implicit invocant'
{
$_ = "GLOBAL VALUE";
for "INNER VALUE" {
is( .lc, "inner value", "Implicit default topic is seen by lc()");
};
is($_,"GLOBAL VALUE","After the loop the implicit topic gets restored");
-
+}
+#?rakudo skip 'implicit invocant'
+{
# as statement modifier
$_ = "GLOBAL VALUE";
is( .lc, "inner value", "Implicit default topic is seen by lc()" )
@@ -134,16 +126,6 @@ my $l;
for @array_l -> $_ { $l = $l ~ $_; };
is($l, '012345', 'for @array -> {} works');
-# ... with referential sub
-#?rakudo skip 'implicit invocant'
-{
- my @array_n = (0 .. 5);
- my $n;
- sub some_sub_3 ($arg) { $n = $n ~ $arg; }
- for (@array_n) { .some_sub_3 };
- is($n, '012345', 'for @array { .some_sub } works');
-}
-
## and now with parens around the @array
my @array_o = (0 .. 5);
@@ -159,17 +141,6 @@ is($o, '012345', 'for (@array) {} works');
is($p, '012345', 'for (@array) -> {} works');
}
-
-# ... with referential sub
-#?rakudo skip 'implicit invocant'
-{
- my @array_r = (0 .. 5);
- my $r;
- sub some_sub_4 ($arg) { $r ~= $arg; }
- for (@array_r) { .some_sub_4 };
- is($r, '012345', 'for (@array) { .some_sub } works');
-}
-
my @elems = <a b c d e>;
{

0 comments on commit 5a882b3

Please sign in to comment.