Permalink
Browse files

pugs fudge

  • Loading branch information...
1 parent 7a77ff8 commit 1e471071fb22420861dc6eb480a62a3fa00dac96 @coke coke committed Jul 8, 2012
View
@@ -2,7 +2,7 @@ use v6;
use Test;
# L<S02/Names and Variables/To get a Perlish representation of any object>
-#?pugs emit plan 78;
+#?pugs emit plan 87;
my @tests = (
# Basic scalar values
@@ -115,6 +115,7 @@ my @tests = (
# RT #61918
#?niecza skip ">>>Stub code executed"
+#?pugs skip ">>>Stub code executed"
{
class RT61918 {
has $.inst is rw;
@@ -171,6 +172,7 @@ my @tests = (
# RT #67948
#?DOES 6
+#?pugs skip '&ITEM not found'
{
my @a;
([0, 0], [1, 1]).grep({@a.push: .perl; 1}).eager;
View
@@ -74,6 +74,7 @@ plan 15;
is bar(), 42, '$_ is implicitly declared "is dynamic" (2)';
}
+#?pugs skip 'Cannot cast from VStr "success" to VCode (VCode)'
{
# ...but other vars are not
my sub foo { my $abc = 17; $CALLER::abc } #OK not used
@@ -85,7 +86,6 @@ plan 15;
my $abs = 23;
#?niecza todo 'strictness'
- #?pugs todo
#?rakudo todo 'strictness'
nok (try bar()) eq 'success',
'vars not declared "is dynamic" are not accessible via $CALLER::';
@@ -105,6 +105,7 @@ plan 15;
is $foo, 43, '"is dynamic" vars are rw in the creating scope (2)';
}
+#?pugs skip "Can't modify constant item: VInt 42"
{
my sub modify { $CALLER::foo++; 'success' }
my $foo is dynamic ::= 42;
@@ -115,7 +116,6 @@ plan 15;
my sub modify { $CALLER::_++ }
$_ = 42;
modify();
- #?pugs todo
is $_, 43, '$_ is implicitly rw (2)';
}
View
@@ -28,6 +28,7 @@ plan 28;
is ($foo, "does_not_matter")[*-2], 42,
"indexing lists by a negative index works correctly";
+ #?pugs todo 'bug'
eval_dies_ok(q/my @a = <one two>; @a[-1] = 'zero'; @a.perl/,
"indexing lists by a negative index without the * dies");
}
View
@@ -211,6 +211,7 @@ my $a = 1;
dies_ok { bar(1) }, 'where-constraint picks up the right lexical (-)';
}
+#?pugs skip 'MI not found'
{
#RT #113434
my subset MI of Int;
View
@@ -397,6 +397,7 @@ my @p;
}
# RT #64818
+#?pugs skip 'R~= NYI'
{
eval_dies_ok q{my $foo = 'foo'; $foo R~= 'foo';},
'use of R~= operator on a non-container dies';
@@ -216,33 +216,40 @@ eval_dies_ok 'my $a; $a++ ++;', 'parse error for "$a++ ++"';
#postincrement tests
$x = Bool;
$y = $x++;
+ #?pugs todo
is $y, False, "Bool postincrement returns Bool";
is $x, True, "Bool postincrement sets True";
$x = False;
$y = $x++;
+ #?pugs todo
is $y, False, "False postincrement returns False";
is $x, True, "False postincrement sets True";
$x = True;
$y = $x++;
is $y, True, "True postincrement returns True";
+ #?pugs todo
is $x, True, "True postincrement sets True";
#postdecrement tests
$x = Bool;
$y = $x--;
+ #?pugs todo
is $y, False, "Bool postdecrement returns Bool";
+ #?pugs todo
is $x, False, "Bool postdecrement sets False";
$x = False;
$y = $x--;
is $y, False, "False postdecrement returns False";
+ #?pugs todo
is $x, False, "False postdecrement sets False";
$x = True;
$y = $x--;
is $y, True, "True postdecrement returns True";
+ #?pugs todo
is $x, False, "True postdecrement sets False";
#preincrement tests
@@ -258,23 +265,31 @@ eval_dies_ok 'my $a; $a++ ++;', 'parse error for "$a++ ++"';
$x = True;
$y = ++$x;
+ #?pugs todo
is $y, True, "True preincrement returns True";
+ #?pugs todo
is $x, True, "True postincrement sets True";
#predecrement tests
$x = Bool;
$y = --$x;
+ #?pugs todo
is $y, False, "Bool predecrement returns False";
+ #?pugs todo
is $x, False, "Bool postdecrement sets False";
$x = False;
$y = --$x;
+ #?pugs todo
is $y, False, "False predecrement returns False";
+ #?pugs todo
is $x, False, "False postdecrement sets False";
$x = True;
$y = --$x;
+ #?pugs todo
is $y, False, "True predecrement returns False";
+ #?pugs todo
is $x, False, "True postdecrement sets False";
};
@@ -276,7 +276,6 @@ ok (0 || 0 || 1), '0 || 0 || 1 is true';
{
my $x;
$x &&= 5;
- #?pugs todo
ok !defined($x), '&&= on a fresh variable works';
my $y ||= 'moin';
is $y, 'moin', '||= on a fresh variable works';
View
@@ -542,6 +542,7 @@ lives_ok {
# RT 113026
#?rakudo todo 'RT 113026 array iterator does not track a growing array'
#?niecza todo 'array iterator does not track a growing array'
+#?pugs todo
{
my @rt113026 = 1 .. 10;
my $iter = 0;
View
@@ -105,6 +105,7 @@ plan 17;
# RT #69178
#?niecza skip 'No value in ANON available for parameter $a'
+#?pugs todo
{
my $b = 1;
my $tracker;
View
@@ -2541,6 +2541,7 @@ ok 'baaabbb' ~~ /a**!2..4/, 'three "a" characters (explicit greed)';
ok 'baaabbb' ~~ /a**:!2..4/, 'three "a" characters (explicit greed)';
# RT 112450
+#?pugs todo 'RT 112450'
{
ok 'foooo' ~~ /^ f o ** 4 $/, 'RT 112450 sanity';
my $rt112450 = 4;
@@ -2551,6 +2552,7 @@ ok 'baaabbb' ~~ /a**:!2..4/, 'three "a" characters (explicit greed)';
}
# RT 112454
+#?pugs skip 'RT 112454'
{
my $rt112454 = 3;
my $ten_x = 'x' x 10;
@@ -2934,6 +2936,7 @@ nok 'aa' ~~ /(.)$1/, 'undefined captures do not match';
# RT #71702
#?niecza todo 'allows them'
+#?pugs todo 'allows them'
eval_dies_ok '"foo" ~~ /<[d..b]>? foo/', 'no reversed char ranges';
done;
View
@@ -75,6 +75,7 @@ is( try { &__hyper.assuming(op => &infix:<+>)(@x, @x) },
is( try { &__hyper.assuming(op => &infix:<+>)(a => @x, b => @x) },
(2,4,46), 'currying functions with named array arguments' );
+#?pugs skip 'No such subroutine: "&FortyTwo"'
{
# tests RT #70890
my $out = "";
View
@@ -20,6 +20,7 @@ lives_ok { my $name = 'A'; require $name }, 'can require with variable name';
'can call subroutines in a module by name';
}
+#?pugs skip 'NYI'
{
require Fancy::Utilities <&allgreet>;
is allgreet(), 'hi all', 'require with import list';
View
@@ -140,6 +140,7 @@ eval_lives_ok 'class Test1 { class A {};}; class Test2 {class A {};};',
}
# RT #72916
+#?pugs todo
{
#?niecza todo 'Exception: Unable to resolve method add_method in type ClassHOW'
eval_lives_ok 'Rat.^add_method("lol", method ($what) { say "lol$what" }) ~~ Method',
View
@@ -31,21 +31,16 @@ is $o.l2, 4, '... and the assignment worked';
is $o.b, 4, '...also to the attribute';
my ($a, $b);
-#?pugs todo
lives_ok { temp $o.l1 = 8; $a = $o.a },
'can use lvalue method in temp() statement (explicit return)';
is $o.l1, 3, '... and the value was reset';
is $o.a, 3, '... also on the attribute';
-#?pugs todo
is $a, 8, 'but the temp assignment had worked';
-#?pugs todo
lives_ok { temp $o.l2 = 9; $b = $o.b },
'can use lvalue method in temp() statement (explicit return)';
is $o.l2, 4, '... and the value was reset';
-#?pugs todo
is $o.b, 4, '... also on the attribute';
-#?pugs todo
is $b, 9, 'but the temp assignment had worked';
# vim: ft=perl6
View
@@ -56,8 +56,9 @@ ok eval q{threads[2].detach},'detach a thread';
ok !@threads[2].join,'could not join a detached thread';
# L<S17/"Thread methods"/"=item suspend">
-#?pugs todo 'unimpl'
+#?pugs skip 'unimpl'
@threads[3] = async { ok do_something_very_important(),'another thread' };
+#?pugs todo 'unimpl'
ok eval q{@threads[3].suspend},' send him back to a waiting room..';
# L<S17/"Thread methods"/"=item resume">
View
@@ -83,6 +83,7 @@ is eval("'møp'".encode('UTF-8')), 'møp', 'eval(Buf)';
# RT 112472
#?niecza todo "No :lang argument yet..."
+#?pugs skip 'Cannot cast from VUndef to VCode'
{
try eval(:lang<rt112472>, '1');
ok "$!" ~~ / 'rt112472' /, 'eval in bogus language mentions the language';
View
@@ -168,6 +168,7 @@ plan 50;
}
# RT #109476
+#?pugs skip 'Odd number of elements'
{
my %h = ( <foo> => []);
push %h<foo>, my $foo = 'bar';
@@ -19,12 +19,15 @@ is roundrobin().elems, 0, 'roundrobin null identity';
is roundrobin(1).join, '1', 'roundrobin scalar identity';
+#?pugs skip 'No such method in class Array: "&Str"'
is(roundrobin(1..3).Str, (1..3).Str, 'roundrobin list identity');
#?rakudo todo 'over-flattening'
+#?pugs todo
is(roundrobin([1..3]).elems, 1, 'roundrobin does not flatten array items');
+#?pugs todo
is(roundrobin((); 1; 2..4; (5..7); <a b>).join(' '),
(1, 2, 5, 'a', 3, 6, 'b', 4, 7).join(' '), 'basic roundrobin');
View
@@ -295,12 +295,15 @@ is (2/3) ** 3, 8/27, "Rat raised to a positive Int power gets correct answer";
}
+#?pugs skip 'Must only use named arguments to new() constructor'
is Rat.new(9,33).norm.nude, (3, 11), ".norm exists and doesn't hurt matters";
isa_ok 241025348275725.3352, Rat, "241025348275725.3352 is a Rat";
+#?pugs skip 'No such method in class Rat: "&norm"'
is 241025348275725.3352.Rat.norm.nude, (301281685344656669, 1250), "Rat.Rat yields correct Rat";
#RT #112822
+#?pugs skip 'No such method in class Rat: "&norm"'
is 241025348275725.3352.Str, "241025348275725.3352", 'stringification of bigish Rats';
done;
@@ -23,20 +23,17 @@ BEGIN {
use Fancy::Utilities :shortgreet, :lolgreet;
is lolgreet('Tene'), 'O HAI TENE', 'Explicitly importing symbols by name works';
- #?pugs todo
nok nicegreet('Jnthn'), 'Good morning, Jnthn!', 'Cannot use a sub not explicitly imported';
}
{
eval_lives_ok 'use Fancy::Utilities :ALL;', 'Can import everything marked for export using :ALL';
use Fancy::Utilities :ALL;
- #?pugs todo
is lolrequest("Cake"), 'I CAN HAZ A CAKE?', 'Can use a sub marked as exported and imported via :ALL';
}
#?rakudo skip "Multi subs aren't imported by default in current Rakudo - is this to spec?"
-#?pugs skip 'no such subroutine, greet'
{
use Fancy::Utilities;
is greet(), 'Hi!', "Multi subs are imported by default - is this to spec?";

0 comments on commit 1e47107

Please sign in to comment.