Skip to content

Commit

Permalink
fudge reduce.t for rakudo
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Aug 9, 2011
1 parent bb4a8e7 commit 9c74a37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions S03-metaops/reduce.t
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
ok ([===] 1, 1, 1, 1), '[===] with literals';
ok ([===] $a, $a, $a), '[===] with vars (positive)';
nok ([===] $a, $a, [1, 2]), '[===] with vars (negative)';
#?rakudo 2 skip '[!===]'
ok ([!===] $a, $b, $a), '[!===] basic sanity (positive)';
nok ([!===] $a, $b, $b), '[!===] basic sanity (negative)';
}
Expand Down Expand Up @@ -163,13 +164,15 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
# [,] returns a scalar (holding an Array)
my $count = 0;
$count++ for [,] @array;
#?rakudo todo 'item context'
is $count, 1, '[,] returns a single Array';
ok ([,] @array) ~~ Positional, '[,] returns something Positional';
}

# Following two tests taken verbatim from former t/operators/reduce.t
#?niecza 2 skip 'These are hyperop tests!'
lives_ok({my @foo = [1..3] >>+<< [1..3] >>+<< [1..3]},'Sanity Check');
#?rakudo todo 'reduced hyper op'
lives_ok({my @foo = [>>+<<] ([1..3],[1..3],[1..3])},'Parse [>>+<<]');

# Check that user defined infix ops work with [...], too.
Expand Down Expand Up @@ -221,13 +224,15 @@ is( ([\R~] 'a'..*).[^8].join(', '), 'a, ba, cba, dcba, edcba, fedcba, gfedcba, h

# RT #65164 implement [^^]
#?niecza skip '^^'
#?rakudo skip '[^^]'
{
is ([^^] 0, 42), 42, '[^^] works (one of two true)';
is ([^^] 42, 0), 42, '[^^] works (one of two true)';
ok ! ([^^] 1, 42), '[^^] works (two true)';
ok ! ([^^] 0, 0), '[^^] works (two false)';

ok ! ([^^] 0, 0, 0), '[^^] works (three false)';
#?rakudo 2 todo '[^^]'
ok ! ([^^] 5, 9, 17), '[^^] works (three true)';

is ([^^] 5, 9, 0), (5 ^^ 9 ^^ 0), '[^^] mix 1';
Expand Down Expand Up @@ -322,6 +327,7 @@ is( ([\R~] 'a'..*).[^8].join(', '), 'a, ba, cba, dcba, edcba, fedcba, gfedcba, h

# RT 57976 implement orelse
#?niecza skip 'huh? these are macros'
#?rakudo skip 'orelse'
{

is (join ', ', [\//] Any, 0, 1),
Expand Down

0 comments on commit 9c74a37

Please sign in to comment.