Skip to content

Commit

Permalink
Miscellaneous niecza unfudges
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Jun 1, 2011
1 parent 7ad8b9d commit ef1d26d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 16 deletions.
12 changes: 5 additions & 7 deletions S03-metaops/reduce.t
Expand Up @@ -23,11 +23,9 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
is(([*] 1,2,3), (1*2*3), "[*] works");
is(([-] 1,2,3), (1-2-3), "[-] works");
is(([/] 12,4,3), (12/4/3), "[/] works");
#?niecza skip 'div'
is(([div] 12,4,3), (12 div 4 div 3), "[div] works");
is(([**] 2,2,3), (2**2**3), "[**] works");
is(([%] 13,7,4), (13%7%4), "[%] works");
#?niecza skip 'mod'
is(([mod] 13,7,4), (13 mod 7 mod 4), "[mod] works");

is((~ [\+] @array), "5 2 9 9 10 1", "[\\+] works");
Expand Down Expand Up @@ -61,7 +59,7 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
}

#?rakudo skip "=:= NYI"
#?niecza skip "=:= NYI"
#?niecza skip "reduce/binding interaction issues"
{
my ($x, $y);
ok ( [=:=] $x, $x, $x), '[=:=] basic sanity 1';
Expand Down Expand Up @@ -105,14 +103,14 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
is ([+] [1, 2, 3, 4]), 4, '[+] does not flatten []-arrays';
}

#?niecza skip 'Mu'
#?niecza skip '[macro]'
{
my @array = (Mu, Mu, 3, Mu, 5);
is ([//] @array), 3, "[//] works";
is ([orelse] @array), 3, "[orelse] works";
}

#?niecza skip 'Mu'
#?niecza skip '[macro]'
{
my @array = (Mu, Mu, 0, 3, Mu, 5);
is ([||] @array), 3, "[||] works";
Expand All @@ -123,7 +121,7 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
is (~ [\||] 0, 0, 3, 4, 5), "0 0 3 3 3", "[\\||] works";
}

#?niecza skip 'Mu'
#?niecza skip '[macro]'
{
my @array = (Mu, Mu, 0, 3, Mu, 5);
my @array1 = (2, 3, 4);
Expand Down Expand Up @@ -217,7 +215,7 @@ ok( ([\<] 42) ~~ Iterable, "[\<] 42 returns something Iterable");

is( ([\*] 1..*).[^10].join(', '), '1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800',
'triangle reduce is lazy');
#?niecza skip 'char ranges'
#?niecza skip 'Str cmp Inf'
is( ([\R~] 'a'..*).[^8].join(', '), 'a, ba, cba, dcba, edcba, fedcba, gfedcba, hgfedcba',
'triangle reduce is lazy');

Expand Down
3 changes: 1 addition & 2 deletions S03-operators/range-basic.t
Expand Up @@ -184,21 +184,20 @@ ok 21 ~~ 3..50, '21 ~~ 3..50';
nok 3 ~~ 11..50, 'not 3 ~~ 11..50';
nok 21 ~~ 1..5, 'not 21 ~~ 1..5';

#?niecza 10 skip 'alphabetic ranges'
ok 'c' ~~ 'b'..'g', "'c' ~~ 'b'..'g'";
ok 'b' ~~ 'b'..'g', "'b' ~~ 'b'..'g'";
ok 'g' ~~ 'b'..'g', "'g' ~~ 'b'..'g'";
nok 'a' ~~ 'b'..'g', "not 'a' ~~ 'b'..'g'";
nok 'h' ~~ 'b'..'g', "not 'h' ~~ 'b'..'g'";
nok 0 ~~ 'a'..'g', "not 0 ~~ 'a'..'g'";

#?niecza 4 skip 'alphabetic/* ranges'
ok 'd' ~~ 'c'..*, "'d' ~~ 'c'..*";
nok 'b' ~~ 'c'..*, "not 'b' ~~ 'c'..*";
ok 'b' ~~ *..'c', "'b' ~~ *..'c'";
nok 'd' ~~ *..'c', "not 'd' ~~ *..'c'";

# RT#75526: [BUG] Some non-alphanumeric ranges don't work
#?niecza skip 'alphabetic ranges'
{
ok ' ' ~~ ' '..' ', "' ' ~~ ' '..' '";
ok ' ' ~~ ' '..'A', "' ' ~~ ' '..'A'";
Expand Down
1 change: 0 additions & 1 deletion S04-statement-modifiers/until.t
Expand Up @@ -28,7 +28,6 @@ plan 4;
is($a, "b, a, b, a", "post until");
}

#?niecza skip "char ranges"
{
my @a = 'a'..'e';
my $a = 0;
Expand Down
1 change: 0 additions & 1 deletion S04-statements/repeat.t
Expand Up @@ -85,7 +85,6 @@ plan 16;

# L<S04/The C<repeat> statement/"bind the result">
#?rakudo skip 'point block on loop'
#?niecza skip 'point block on loop'
{
my $x = 0; repeat until $x >= 10 -> $another_x {
pass('repeat until with binding starts undefined') unless $another_x.defined;
Expand Down
2 changes: 0 additions & 2 deletions S04-statements/while.t
Expand Up @@ -48,7 +48,6 @@ plan 9;
#?mildew skip 1
# L<S04/The C<for> statement/It is also possible to write>
# while ... -> $x {...}
#?niecza skip 'while -> $x'
{
my @array = 1..5;
my $str = "";
Expand All @@ -59,7 +58,6 @@ plan 9;
}

#?mildew skip 1
#?niecza skip 'while -> $x'
{
my @array = 0..5;
my $str = "";
Expand Down
1 change: 0 additions & 1 deletion S06-signature/slurpy-and-interpolation.t
Expand Up @@ -35,7 +35,6 @@ dies_ok {
sub f2(*%h) { f1(|%h) };
lives_ok { f2( :a(1) ) },
'Can interpolate hashes into slurpy named parameters';
#?niecza skip 'eval return value'
is eval(f2(:a(4))).<a>, 4, '... with a sane return value';
}

Expand Down
3 changes: 1 addition & 2 deletions S32-array/push.t
Expand Up @@ -44,10 +44,9 @@ plan 49;
my @push_result = @p.push( 'yo, check it' );

is( +@p, 2, 'array received second element' );
#?niecza skip 'return value of push'
#?niecza skip 'Array.ACCEPTS'
ok( @push_result ~~ @p, 'modified array, returned' );
is( ~@p, 'bughunt yo, check it', '~@p' );
#?niecza skip 'return value of push'
is( ~@p.push('!'), 'bughunt yo, check it !', '~ on the push' );
}

Expand Down

0 comments on commit ef1d26d

Please sign in to comment.