Permalink
Browse files

[t/spec] unfudge tests for RT #67882, and add a few more (because I d…

…id not see the existing tests early enough)

git-svn-id: http://svn.pugscode.org/pugs@30991 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 778b1d2 commit 08773541b7af551ae538f14fcae67c7c971e8de2 moritz committed May 30, 2010
Showing with 9 additions and 2 deletions.
  1. +9 −2 S03-operators/range.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 107;
+plan 110;
# L<S03/Nonchaining binary precedence/Range object constructor>
@@ -159,7 +159,6 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
}
# RT #67882
-#?rakudo skip "Does not automatically turn match objects into strings / numbers"
{
my $range;
lives_ok { '1 3' ~~ /(\d+) \s (\d+)/; $range = $0..$1 },
@@ -169,6 +168,13 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
lives_ok { "$range" }, 'can stringify range';
is ~$range, "1 2 3", 'range is correct';
}
+# and another set, just for the lulz
+# RT #67882
+{
+ ok '1 3' ~~ /(\d) . (\d)/, 'regex sanity';
+ isa_ok $0..$1, Range, '$0..$1 constructs a Range';
+ is ($0..$1).join('|'), '1|2|3', 'range from $0..$1';
+}
{
my $range;
lives_ok { '1 3' ~~ /(\d+) \s (\d+)/; $range = +$0..+$1 },
@@ -199,4 +205,5 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
ok !defined(try { 0 .. (0, 1, 2) }), '0 .. List is illegal';
}
+
# # vim: ft=perl6

0 comments on commit 0877354

Please sign in to comment.