Skip to content
Browse files

[t/spec] test for .grep on Range, and unfudge Range.map test

git-svn-id: http://svn.pugscode.org/pugs@24513 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 872dfb1 commit 3f4b7611c387d473cffb56ce7cd4283727520969 moritz committed Dec 20, 2008
Showing with 4 additions and 4 deletions.
  1. +4 −4 S03-operators/range.t
View
8 S03-operators/range.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 77;
+plan 78;
# 3..2 must *not* produce "3 2". Use reverse to get a reversed range. -lwall
@@ -129,10 +129,10 @@ is (1..6 Z 'a' .. 'c').join(''), '1a2b3c', 'Ranges and infix:<Z>';
is ~(@three ^..^ @one), "" , "both exclusive limits are in scalar context";
}
-# test that .map works on ranges
-#?rakudo skip 'map on range'
+# test that .map and .grep work on ranges
{
- is (0..3).map({$_ * 2}).join('|'), '0|2|4|6', '.map works on ranges';
+ is (0..3).map({$_ * 2}).join('|'), '0|2|4|6', '.map works on ranges';
+ is (0..3).grep({$_ == 1|3}).join('|'), '1|3', '.grep works on ranges';
}
# For tests involving :by, see t/operators/adverbial_modifiers.t

0 comments on commit 3f4b761

Please sign in to comment.
Something went wrong with that request. Please try again.