Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
pugs fudges
Recent spec updates mean we no longer conform. (plus some new tests we never passed)
  • Loading branch information
coke committed Mar 3, 2013
1 parent b10025a commit 7156048
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions S02-literals/quoting.t
Expand Up @@ -601,6 +601,7 @@ is "foo $( my $x = 3 + 4; "bar" ) baz", 'foo bar baz', 'declaration in interpola
#?pugs todo "Weird quoting issue"
is <<<\>'n'>>.join('|'), '<>|n', 'texas quotes edge case';
#?pugs todo
{
$_ = 'abc';
/a./;
Expand Down
1 change: 1 addition & 0 deletions S02-types/subset.t
Expand Up @@ -222,6 +222,7 @@ my $a = 1;
}

# RT #74352
#?pugs skip 'parsefail'
{
subset A of Array;
subset B of A;
Expand Down
1 change: 1 addition & 0 deletions S03-operators/assign.t
Expand Up @@ -959,6 +959,7 @@ sub l () { 1, 2 };
}

# RT #77174
#?pugs todo
{
my @a //= (3);
is @a.perl, "Array.new()";
Expand Down
1 change: 1 addition & 0 deletions S04-statements/for.t
Expand Up @@ -574,6 +574,7 @@ dies_ok
}, 'for in called method runs (was a sink context bug)';

# RT #77460
#?pugs todo
{
my @a = 1;
for 1..10 {
Expand Down
3 changes: 1 addition & 2 deletions S05-interpolation/regex-in-variable.t
Expand Up @@ -44,7 +44,6 @@ ok("aaaaab" ~~ m/<{$foo}>/, 'Rulish scalar match 4');
#?pugs todo
ok("aaaaab" ~~ m/<$foo>/, 'Rulish scalar match 5');
ok(!("aaaaab" ~~ m/$foo/), 'Rulish scalar match 6');
#?pugs todo
ok(!('aaaaab' ~~ m/"$foo"/), 'Rulish scalar match 7');

# RT #61960
Expand All @@ -69,7 +68,7 @@ ok(!( "!" ~~ m/@var/ ), 'Simple array match (!)');
ok("!!!!a!!!!!" ~~ m/@var/, 'Nested array match (a)');
#?pugs todo
ok("!!!!e!!!!!" ~~ m/@var/, 'Nested array match (e)');
#?pugs todo
#?pugs skip 'parsefail'
is("foo123bar" ~~ /@( rx/\d+/ )/, '123', 'Match from correct position');

#?pugs todo
Expand Down
2 changes: 2 additions & 0 deletions S05-mass/rx.t
Expand Up @@ -2577,7 +2577,9 @@ ok 'baaabbb' ~~ /a**:!2..4/, 'three "a" characters (explicit greed)';
}

# RT 115298
#?pugs todo
ok 'foobar' ~~ /$( $_ )/, '$( $_ ) will match literally';
#?pugs todo
is $/, 'foobar', '... will match correctly';

#### <ident> 2+3 ab2 /mob<ident>: <ab2 @ 4>/ capturing builtin <ident>
Expand Down
3 changes: 3 additions & 0 deletions S05-metasyntax/charset.t
Expand Up @@ -37,9 +37,12 @@ ok("y" ~~ m/(<[a..z]-[aeiou]>)/, 'Difference set match');
is($0, 'y', 'Difference set capture');

# RT #115802
#?pugs todo
ok( "abc" ~~ m/<[\w]-[\n]>/, 'Difference set match');
ok(!("abc" ~~ m/<[\w]-[\N]>/), 'Difference set match');
#?pugs todo
is(("abc123" ~~ m/<[\w]-[a\d]>+/), 'bc', 'Difference set match');
#?pugs todo
is(("abc123" ~~ m/<[\w]-[1\D]>+/), '23', 'Difference set match');

ok(!( "a" ~~ m/(<+alpha-[aeiou]>)/ ), 'Named difference set failure');
Expand Down
1 change: 1 addition & 0 deletions S05-metasyntax/litvar.t
Expand Up @@ -66,6 +66,7 @@ is("abc" ~~ m/ || @var /, 'a', 'Array using explicit sequential semantics');
# contextializer $( )

# RT 115298
#?pugs 4 todo
ok 'foobar' ~~ /$( $_ )/, '$( $_ ) will match';
is $/, 'foobar', '... $( $_ ) matched entire string';
is 'foobar' ~~ /$( $_.substr(3) )/, 'bar', 'Contextualizer with functions calls';
Expand Down
1 change: 1 addition & 0 deletions S12-class/lexical.t
Expand Up @@ -30,6 +30,7 @@ eval_dies_ok '{ my class B {}; B.new; }; B.new',
ok $pint ~~ WeissBier, 'can smart-match against lexical class';
is $pint.name, 'Erdinger', 'attribute in lexical class works';
is $pint.describe, 'outstanding flavour', 'method call on lexical class works';
#?pugs todo
is WeissBier.gist, '(WeissBier)', 'lexical type object stringifies correct';

my class LessThanAmazingWeissBier is WeissBier {
Expand Down
1 change: 1 addition & 0 deletions S14-roles/lexical.t
Expand Up @@ -24,6 +24,7 @@ eval_dies_ok '{ my class R3 {}; R3; }; R3',
method catwalk() { 'ooh pretty!' }
}

#?pugs todo
is Model.gist, '(Model)', 'lexical role type object stringifies OK';
is Model.catwalk, 'ooh pretty!', 'can pun lexical role';

Expand Down
1 change: 1 addition & 0 deletions S32-list/pick.t
Expand Up @@ -171,6 +171,7 @@ is (1..^2).pick, 1, 'pick on 1-elem range';
ok ('a'..'z').pick ~~ /\w/, 'Range.pick on non-Int range';

# RT #109586
#?pugs skip 'hogs memory'
nok ([==] (^2**64).roll(10).map(* +& 15)), 'Range.pick has enough entropy';

# vim: ft=perl6
1 change: 1 addition & 0 deletions S32-num/rat.t
Expand Up @@ -23,6 +23,7 @@ isa_ok( eval(Rat.new(1, 3).perl), Rat, 'eval Rat.new(1, 3).perl is Rat' );
is( (eval Rat.new(1, 3).perl), 1/3, 'eval Rat.new(1, 3).perl is 1/3' );
isa_ok( eval((1/3).perl), Rat, 'eval (1/3).perl is Rat' );
is( (eval (1/3).perl), 1/3, 'eval (1/3).perl is 1/3' );
#?pugs 3 todo 'tenths'
is( (1/10).perl, "0.1", '(1/10).perl is 0.1' );
is( (1/5).perl, "0.2", '(1/5).perl is .2' );
is( (1/2).perl, "0.5", '(1/2).perl is .5' );
Expand Down
1 change: 1 addition & 0 deletions integration/advent2009-day01.t
Expand Up @@ -7,6 +7,7 @@ plan(2);

# say "Hello World";

#?pugs todo 'gist spec changed'
is( (10/7).WHAT.gist, '(Rat)', 'WHAT');

is(([+] (1..999).grep( { $_ % 3 == 0 || $_ % 5 == 0 } )), 233168, 'Project Euler #1');

0 comments on commit 7156048

Please sign in to comment.