Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pugs fudge

  • Loading branch information...
commit abc9cbd0b8a62160b08ba05bd0662ae8ed0224b9 1 parent ec8593e
@coke coke authored
View
2  S02-literals/quoting-unicode.t
@@ -34,6 +34,8 @@ RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER(U+298D/U+298E)';
DOUBLE PRIME QUOTATION MARK(U+301D/U+301E)';
}
+#?pugs skip 'hangs'
+#?DOES 63
{
my %ps_pe = (
'(' => ')', '[' => ']', '{' => '}', '' => '', '' => '',
View
5 S02-types/compact.t
@@ -11,8 +11,11 @@ plan 10;
my uint8 @buffer = ('A' .. 'Z').map({ .ord });
is(@buffer[0], ord('A'), 'basic sanity test (1)');
is(@buffer[25], ord('Z'), 'basic sanity test (2)');
+ #?pugs todo
is(substr(@buffer, 0, 8), ord('A'), 'substr on compact array (1)');
+ #?pugs todo
is(substr(@buffer, 200, 8), ord('Z'), 'substr on compact array (2)');
+ #?pugs skip 'sprintf hangs'
is(
substr(@buffer, 0, 16),
sprintf('%08d%08d', ord('A'), ord('B')),
@@ -22,6 +25,7 @@ plan 10;
#?rakudo skip "Scope not found for PAST::Var"
# buffer acting as a compact array
+#?pugs skip 'sprintf hangs'
{
my buf8 $buffer = ('A' .. 'Z').map({sprintf('%08d', .ord)}).cat;
is($buffer[0], ord('A'), 'array indexing on buffer (1)');
@@ -35,6 +39,7 @@ plan 10;
# L<S09/Compact arrays/The size of any buffer type in bytes may be found with the .bytes method>
#?rakudo skip "Scope not found for PAST::Var"
+#?pugs skip 'sprintf hangs'
{
my buf8 $buf8 = ('A' .. 'Z').map({sprintf('%08d', .ord)}).cat;
my buf16 $buf16 = ('A' .. 'Z').map({sprintf('%08d', .ord)}).cat;
View
1  S03-smartmatch/any-bool.t
@@ -7,6 +7,7 @@ plan 8;
{
sub is-true() { True };
sub is-false() { False };
+ #?pugs 2 todo
ok 0 ~~ is-true(), '~~ non-syntactic True';
ok 'a' ~~ is-true(), '~~ non-syntactic True';
nok 0 ~~ is-false(), '~~ non-syntactic True';
View
4 S03-smartmatch/array-hash.t
@@ -6,12 +6,16 @@ plan 6;
{
my %h = (a => 'b', c => Mu);
#?niecza todo
+ #?pugs todo
ok (['a'] ~~ %h), 'Array ~~ Hash (exists and True)';
#?niecza todo
+ #?pugs todo
ok (['c'] ~~ %h), 'Array ~~ Hash (exists but Mu)';
#?niecza todo
+ #?pugs todo
ok ([<a c>] ~~ %h), 'Array ~~ Hash (both exist)';
#?niecza todo
+ #?pugs todo
ok ([<c d>] ~~ %h), 'Array ~~ Hash (one exists)';
# note that ?any() evaluates to False
ok !( () ~~ %h), 'Array ~~ Hash (empty list)';
View
17 S05-capture/match-object.t
@@ -6,28 +6,45 @@ use Test;
plan 21;
+#?pugs todo
ok 'ab12de' ~~ /\d+/, 'match successful';
is $/.WHAT.gist, Match.gist, 'got right type';
+#?pugs todo
ok $/.Bool, '.Bool';
ok $/.defined, '.defined';
+#?pugs skip 'Match.Str'
is $/.Str, '12', '.Str';
+#?pugs todo
is $/.from, 2, '.from';
+#?pugs todo
is $/.to, 4, '.to';
+#?pugs skip 'Match.prematch'
is $/.prematch, 'ab', '.prematch';
+#?pugs skip 'Match.postmatch'
is $/.postmatch, 'de', '.postmatch';
+#?pugs todo
is $/.list.elems, 0, '.list (empty)';
+#?pugs skip 'Unimplemented unaryOp: hash'
is $/.hash.elems, 0, '.hash (empty)';
+#?pugs skip 'Not a keyed value'
is $/.keys.elems, 0, '.keys (empty)';
+#?pugs skip 'Not a keyed value'
is $/.values.elems, 0, '.values (empty)';
+#?pugs skip 'Not a keyed value'
is $/.pairs.elems, 0, '.pairs (empty)';
+#?pugs skip 'Not a keyed value'
is $/.kv.elems, 0, '.kv (empty)';
nok 'abde' ~~ /\d/, 'no match';
nok $/.Bool, 'failed match is False';
+#?pugs skip 'Match.Str'
is $/.Str, '', 'false match stringifies to empty string';
my $c;
#?rakudo 3 skip 'Non-declarative sigil is missing its name at line 1, near "$\x{a2} }/\n"'
+#?pugs todo
ok 'abc' ~~ /.{ $c = $¢ }/, 'current match state';
+#?pugs skip 'Cursor'
is $c.WHAT.gist, Cursor.gist, 'got right type';
+#?pugs skip 'Scalar.pos'
ok defined($c.pos), '.pos';
View
6 S05-metasyntax/changed.t
@@ -8,12 +8,16 @@ plan 12;
{
# A dot . now matches any character including newline.
my $str = "abc\ndef";
+ #?pugs todo
ok($str ~~ /./, '. matches something');
+ #?pugs todo
ok($str ~~ /c.d/, '. matches \n');
# ^ and $ now always match the start/end of a string, like the old \A and \z.
+ #?pugs todo
ok($str ~~ /^abc/, '^ matches beginning of string');
ok(!($str ~~ /^de/), '^ does not match \n');
+ #?pugs todo
ok($str ~~ /def$/, '$ matches end of string');
ok(!($str ~~ /bc$/), '$ does not match \n');
@@ -24,11 +28,13 @@ plan 12;
# A $ no longer matches an optional preceding \n
{
my $str = "abc\ndef\n";
+ #?pugs todo
ok($str ~~ /def\n$/, '\n$ matches as expected');
ok(!($str ~~ /def$/), '$ does not match \n at end of string');
}
# The \A, \Z, and \z metacharacters are gone.
+#?pugs todo
{
eval_dies_ok('/\A/', '\\A is gone');
eval_dies_ok('/\Z/', '\\Z is gone');
View
2  S06-routine-modifiers/scoped-named-subs.t
@@ -25,6 +25,7 @@ eval_dies_ok('myNamedInt()', 'Correct : lexical named sub myNamedInt() should NO
our Str sub ourNamedStr() { return 'string' };
is ourNamedStr(), 'string', 'package-scoped named sub() return Str';
}
+#?pugs skip 'Cannot use Undef as a Code object'
{
our &ourNamedStr;
is ourNamedStr(), 'string', 'Correct : package-scoped named sub ourNamedStr() should BE available in the whole package';
@@ -34,6 +35,7 @@ eval_dies_ok('myNamedInt()', 'Correct : lexical named sub myNamedInt() should NO
our Int sub ourNamedInt() { return 55 };
is ourNamedInt(), 55, 'package-scoped named sub() return Int';
}
+#?pugs skip 'Cannot use Undef as a Code object'
{
our &ourNamedInt;
is ourNamedInt(), 55, 'Correct : package-scoped named sub ourNamedInt() should BE available in the whole package';
View
6 S11-modules/importing.t
@@ -21,16 +21,21 @@ plan 16;
is( bop(), 'Foo::bop', 'Foo::bop is the sub we expect' );
multi waz($x) { 'Foo::wazhere' } #OK not used
+ #?pugs skip 'Cannot cast from VUndef to VCode'
ok( &waz, 'Foo::waz multi is defined (implicitly :DEFAULT)' );
is( waz(), 'Foo::waz', 'Foo::waz is the sub we expect' );
is( waz(1), 'Foo::wazhere', 'Foo::waz imported does not wipe out our other waz multis' );
+ #?pugs todo
dies_ok { eval 'qux()' }, 'qux() not imported';
+ #?pugs todo
dies_ok { eval 'gaz()' }, 'gaz() not imported';
}
+#?pugs skip 'Undeclared variable'
ok( ! &foo, 'Foo::foo is undefined in outer scope' );
+#?pugs todo
{
BEGIN { @*INC.push('t/spec/packages') };
class TestImportInClass {
@@ -44,6 +49,7 @@ ok( ! &foo, 'Foo::foo is undefined in outer scope' );
}
+#?pugs todo
eval_dies_ok 'use t::spec::packages::S11-modules::Foo :NoSucTag;',
'die while trying to import a non-existent export tag';
View
4 S12-methods/accessors.t
@@ -36,9 +36,11 @@ class A {
my $a = A.new(a => (1, 2, 3, 4), b => [3, 4, 5, 6]);
is $a.test-list-a, 4, '@.a contextualizes as (flat) list (1)';
+#?pugs todo
is $a.test-scalar-a, 1, '$.a contextualizes as item (1)';
is $a.test-list-b, 4, '@.a contextualizes as (flat) list (2)';
is $a.test-scalar-b, 1, '$.a contextualizes as item (2)';
+#?pugs skip 'Cannot cast into Hash'
is $a.test-hash-a, 2, '%.a contextualizes as hash';
# RT #78678
@@ -54,7 +56,9 @@ is $a.test-hash-a, 2, '%.a contextualizes as hash';
my $o = Child.new(x => 42);
$o.Parent::x = 5;
is $o.parent-x, 5, 'parent attribute is separate from child attribute of the same name (parent)';
+ #?pugs todo
is $o.child-x, 42, 'parent attribute is separate from child attribute of the same name (child)';
+ #?pugs todo
is $o.x, 42, '.accessor returns that of the child';
}
View
2  S13-overloading/operators.t
@@ -20,6 +20,7 @@ plan 4;
is 5!, 120, 'Can define recursive postfix operator';
}
+#?pugs todo
{
class A does Associative {
method postcircumfix:<{ }>(*@ix) {
@@ -35,6 +36,7 @@ plan 4;
# (even though the ticket title claims it, the actual problem was not related
# to monkey typing/augmenting at all)
+#?pugs skip 'Cannot cast from VObject'
{
class B {
has $.x;
View
2  S14-roles/lexical.t
@@ -15,6 +15,7 @@ Tests for lexical roles delcared with 'my role'
eval_lives_ok 'my role R1 {}', 'my role parses OK';
eval_lives_ok '{ my role R2 {} }; { my role R2 {} }',
'declare roles with the same name in two scopes.';
+#?pugs todo
eval_dies_ok '{ my class R3 {}; R3; }; R3',
'scope is correctly restricted';
@@ -23,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';
View
1  S14-roles/namespaced.t
@@ -15,6 +15,7 @@ role A::B {
};
#?rakudo todo 'nom regression'
+#?pugs todo
is(A::B.WHAT.gist, 'B()', 'A::B.WHAT stringifies to short name B');
class X does A::B {
View
3  S29-conversions/hash.t
@@ -21,16 +21,19 @@ Basic tests for the hash() built-in
is hash().elems, 0, "hash() doesn't auto-hash $/";
}
+#?pugs skip 'Unimplemented unaryOp: hash'
{
is ('a'..'c' Z 1..3).hash.<a>, 1, "hash() builds a sensible hash";
is ('a'..'c' Z 1..3).hash.<b>, 2, "hash() builds a sensible hash";
is ('a'..'c' Z 1..3).hash.<c>, 3, "hash() builds a sensible hash";
}
+#?pugs todo 'Unimplemented unaryOp: hash'
{
lives_ok {(a => 1, b => 2).hash.perl}, 'hash() on list of pairs lives (RT #76826)';
}
+#?pugs skip 'Unimplemented unaryOp: hash'
{
dies_ok {hash(<1 2 3>)}, "hash() won't create invalid hash";
}
View
2  integration/advent2009-day12.t
@@ -23,6 +23,7 @@ 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';
}
@@ -34,6 +35,7 @@ BEGIN {
}
#?rakudo skip "Multi subs aren't imported by default in current Rakudo - is this to spec?"
+#?pugs skip "No such subroutine"
{
use Fancy::Utilities;
is greet(), 'Hi!', "Multi subs are imported by default - is this to spec?";
View
8 integration/advent2009-day14.t
@@ -12,16 +12,19 @@ is_approx (3/7).Num + (2/7).Num + (2/7).Num - 1, -1.1102230e-16;
is 3/7 + 2/7 + 2/7 - 1, 0;
#?rakudo todo "New Rat.perl"
+#?pugs todo "<>"
is (3/7).perl, "<3/7>";
is (3/7).numerator, 3;
is (3/7).denominator, 7;
+#?pugs skip 'nude'
is (3/7).nude.join('|'), "3|7";
my $a = 1/60000 + 1/60000;
is $a.WHAT, Rat;
is_approx $a, 3.3333333e-05;
#?rakudo todo "New Rat.perl"
+#?pugs todo "<>"
is $a.perl, "<1/30000>";
$a = 1/60000 + 1/60001;
@@ -33,14 +36,19 @@ ok $a ~~Num, 'cos() returned a Num';
is_approx $a, 0.99999999;
#?rakudo 2 todo "New Rat.perl"
+#?pugs todo "<>"
is 3.14.Rat.perl, "<157/50>";
+#?pugs todo "<>"
is pi.Rat.perl, "<355/113>";
#?rakudo todo 'nom regression'
+#?pugs todo "<>"
is pi.Rat(1e-10).perl, "<312689/99532>";
is 1.75.WHAT, Rat;
#?rakudo 2 todo "New Rat.perl"
+#?pugs todo "<>"
is 1.75.perl, "<7/4>";
+#?pugs todo "<>"
is 1.752.perl, "<219/125>";
done;
Please sign in to comment.
Something went wrong with that request. Please try again.