Permalink
Browse files

[t/spec] merge mis-placed mutating_listops.t into S04-statements/for.t

git-svn-id: http://svn.pugscode.org/pugs@27839 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent df18e1e commit 985603b323f49fdef19c6e905e4bb9a5da0069eb moritz committed Aug 2, 2009
Showing with 8 additions and 16 deletions.
  1. +8 −1 S04-statements/for.t
  2. +0 −15 S32-list/mutating_listops.t
@@ -11,7 +11,7 @@ for statement as possible
=end description
-plan 55;
+plan 56;
## No foreach
# L<S04/The C<for> statement/"no foreach statement any more">
@@ -186,6 +186,13 @@ my @elems = <a b c d e>;
}
{
+ my @array = <a b c d>;
+ for @array { $_ ~= "c" }
+ is ~@array, "ac bc cc dc",
+ 'mutating $_ in for works';
+}
+
+{
my @array_t = (0..2);
my @t = (1..3);
for @array_t -> $val is rw { $val++ };
@@ -1,15 +0,0 @@
-use v6;
-
-use Test;
-
-plan 1;
-
-{
- my @array = <a b c d>;
- for @array { $_ ~= "c" }
- is ~@array, "ac bc cc dc",
- 'mutating $_ in for works';
-}
-
-# Hm... what about @array.sort: { $_ = ... }? Disallow? (As that would prevent
-# many optimizations...) (and Perl 5 never allowed that anyway)

0 comments on commit 985603b

Please sign in to comment.