Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rakudo.jvm fudge

  • Loading branch information...
commit 9f962639fa242b1b405ee0ad324363786a53a873 1 parent 9a4c899
@coke coke authored
View
1  S02-magicals/pid.t
@@ -13,6 +13,7 @@ L<A05/"RFC 332: Regex: Make /\$/ equivalent to /\z/ under the '/s' modifier" /Th
plan 1;
+#?rakudo.jvm todo "this test may need to be skipped when using the eval server"
is_run 'say $*PID',
{
out => -> $p { $p > 0 && $p != $*PID },
View
1  S05-modifier/perl5_5.t
@@ -19,6 +19,7 @@ is(("acdbcdbe" ~~ rx:P5/a(?:b|c|d){2}(.)/ && $0), "b", 're_tests 609/1 (793)');
is(("acdbcdbe" ~~ rx:P5/a(?:b|c|d){4,5}(.)/ && $0), "b", 're_tests 611/1 (795)');
is(("acdbcdbe" ~~ rx:P5/a(?:b|c|d){4,5}?(.)/ && $0), "d", 're_tests 613/1 (797)');
is(("acdbcdbe" ~~ rx:P5/a(?:b|c|d){6,7}(.)/ && $0), "e", 're_tests 615/1 (799)');
+#?rakudo.jvm todo "nigh"
is(("acdbcdbe" ~~ rx:P5/a(?:b|c|d){6,7}?(.)/ && $0), "e", 're_tests 617/1 (801)');
is(("acdbcdbe" ~~ rx:P5/a(?:b|c|d){5,6}(.)/ && $0), "e", 're_tests 619/1 (803)');
is(("acdbcdbe" ~~ rx:P5/a(?:b|c|d){5,6}?(.)/ && $0), "b", 're_tests 621/1 (805)');
View
1  S06-advanced/callframe.t
@@ -13,6 +13,7 @@ my $baseline = 10;
isa_ok callframe(), CallFrame, 'callframe() returns a CallFrame';
sub f() {
+ #?rakudo.jvm todo "nigh"
is callframe().line, $baseline + 5, 'callframe().line';
ok callframe().file ~~ /« callframe »/, '.file';
View
4 S06-other/main-usage.t
@@ -23,6 +23,7 @@ is_run 'sub MAIN() { print "MAIN() called" }; sub USAGE() { print "USAGE() calle
},
'a user-defined USAGE sub is not called if MAIN dispatch succeeds';
+#?rakudo.jvm todo "nigh"
is_run 'sub MAIN( $a = nosuchsub()) { }; sub USAGE { say 42 }',
{
out => '',
@@ -30,6 +31,7 @@ is_run 'sub MAIN( $a = nosuchsub()) { }; sub USAGE { say 42 }',
},
'if the MAIN dispatch results in an error, that error should be printed, not USAGE';
+#?rakudo.jvm todo "nigh"
is_run 'sub MAIN($foo) { }',
{
err => /<< foo >>/,
@@ -82,6 +84,7 @@ is_run 'sub MAIN(:xen(:$xin)) { print $xin }',
'named alias (outer name)';
# RT #71366
+#?rakudo.jvm todo "nigh"
is_run 'sub MAIN($a, :$var) { say "a: $a, optional: $var"; }',
{
err => /\-\-var/,
@@ -160,6 +163,7 @@ is_run 'multi MAIN($) { print q[Any] }; multi MAIN(Str) { print q[Str] }',
},
'best multi matches (not just first one)';
+#?rakudo.jvm todo "nigh"
is_run 'sub MAIN() { print 42 }', :args['--foo'],
{
out => '',
View
2  S14-roles/anonymous.t
@@ -21,8 +21,10 @@ plan 13;
is $a, {:x}, "basic sanity";
my $role;
lives_ok { $role = role { has $.cool = "yeah" } }, "anonymous role definition";
+ #?rakudo.jvm todo "nigh"
lives_ok { $a does $role }, "anonymous role variable mixin";
is $a, {:x}, "still basic sanity";
+ #?rakudo.jvm todo "nigh"
is $a.cool, "yeah", "anonymous role variable gave us an attribute";
}
View
1  S19-command-line/dash-e.t
@@ -6,6 +6,7 @@ BEGIN { @*INC.push: 't/spec/packages' }
use Test::Util;
my Str $x;
+#?rakudo.jvm 3 skip "nigh"
is_run $x, :args['-e', 'print q[Moin]'],
{
out => 'Moin',
View
2  S29-context/die.t
@@ -55,6 +55,7 @@ is ({ try { die_in_return(); 23 }; 42 }()), 42, "die in return";
is "$!", $msg, 'die with no argument uses $!';
}
+#?rakudo.jvm todo "nigh"
is_run( 'die "first line"',
{ status => sub { 0 != $^a },
out => '',
@@ -62,6 +63,7 @@ is_run( 'die "first line"',
},
'die with no output' );
+#?rakudo.jvm todo "nigh"
is_run( 'say "hello"; die "Nos morituri te salutant!\n"',
{ status => sub { 0 != $^a },
out => "hello\n",
View
2  S29-context/exit.t
@@ -12,10 +12,12 @@ is_run 'say 3; exit; say 5',
{ out => "3\n", err => "", status => 0 },
'bare exit; works';
+#?rakudo.jvm todo "nigh"
is_run 'say 3; exit 5; say 5',
{ out => "3\n", err => "", status => 5 +< 8 },
'exit 5; works';
+#?rakudo.jvm todo "nigh"
is_run 'say 3; try { exit 5 }; say 5',
{ out => "3\n", err => "", status => 5 +< 8 },
'try-block does not catch exit exceptions';
View
1  S29-os/system.t
@@ -14,6 +14,7 @@ if $*OS eq "browser" {
my $res;
$res = run($*EXECUTABLE_NAME,'-e1');
+#?rakudo.jvm todo "nigh"
ok($res,"run() to an existing program does not die (and returns something true)");
$res = run("program_that_does_not_exist_ignore_this_error_please.exe");
View
2  S32-basics/warn.t
@@ -37,6 +37,7 @@ use Test::Util;
}
#?niecza todo
+#?rakudo.jvm todo "nigh"
is_run 'use v6; warn; say "alive"',
{
status => 0,
@@ -54,6 +55,7 @@ is_run 'use v6; warn("OH NOEZ"); say "alive"',
},
'warn() with arguments; line number';
+#?rakudo.jvm todo "nigh"
is_run 'use v6; try {warn("OH NOEZ") }; say "alive"',
{
status => 0,
View
10 S32-exceptions/misc.t
@@ -231,6 +231,7 @@ throws_like '"a".match(:x([1, 2, 3]), /a/).Str', X::Str::Match::x, got => Array;
throws_like '"a".trans([Any.new] => [Any.new])', X::Str::Trans::IllegalKey, key => Any;
throws_like '"a".trans(rx/a/)', X::Str::Trans::InvalidArg, got => Regex;
+#?rakudo.jvm skip "wrong exception type"
throws_like '1.foo', X::Method::NotFound, method => 'foo', typename => 'Int';
throws_like '1.+foo', X::Method::NotFound, method => 'foo', typename => 'Int';
throws_like 'my class Priv { method x { self!foo } }; Priv.x',
@@ -239,6 +240,7 @@ throws_like 'my class Priv { method x { self!foo } }; Priv.x',
typename => 'Priv',
private => { $_ === True };
# RT #77582
+#?rakudo.jvm skip "wrong exception type"
throws_like 'my %h; %h.nosuchmethods', X::Method::NotFound, typename => 'Hash';
throws_like '1.List::join', X::Method::InvalidQualifier,
@@ -267,13 +269,19 @@ throws_like 'sub f() returns Str { 5 }; f', X::TypeCheck::Return, got => Int, ex
throws_like 'my Int $x = "foo"', X::TypeCheck::Assignment, got => 'foo',
expected => Int, symbol => '$x';
+#?rakudo.jvm skip "wrong exception type"
throws_like 'sub f() { }; f() = 3', X::Assignment::RO;
+#?rakudo.jvm skip "wrong exception type"
throws_like '1.0 = 3', X::Assignment::RO;
# RT #113534
+#?rakudo.jvm skip "wrong exception type"
throws_like '120 = 3', X::Assignment::RO;
+#?rakudo.jvm skip "wrong exception type"
throws_like '1e0 = 3', X::Assignment::RO;
+#?rakudo.jvm skip "wrong exception type"
throws_like '"a" = 3', X::Assignment::RO;
+#?rakudo.jvm skip "wrong exception type"
throws_like '1.foo', X::Method::NotFound, method => 'foo', typename => 'Int';
throws_like 'my class NC { }; NC.new does NC', X::Mixin::NotComposable,
:target(*.defined), :rolish(*.^name eq 'NC');
@@ -400,6 +408,7 @@ throws_like 'class Foobar is Foobar', X::Inheritance::SelfInherit, name => "Foob
throws_like q{if 10 > 5 { say "maths works!" } else if 10 == 5 { say "identity is weird" } else { say "math is weird" }}, X::Syntax::Malformed::Elsif;
}
+#?rakudo.jvm skip "wrong exception type"
{
# RT #72958
throws_like q{1/2.''()}, X::Method::NotFound, method => '', typename => 'Int';
@@ -410,6 +419,7 @@ throws_like 'class Foobar is Foobar', X::Inheritance::SelfInherit, name => "Foob
throws_like q{role Bottle[::T] { method Str { "a bottle of {T}" } }; class Wine { ... }; say Bottle[Wine].new;}, X::Package::Stubbed;
}
+#?rakudo.jvm skip "wrong exception type"
throws_like q[sub f() {CALLER::<$x>}; my $x; f], X::Caller::NotDynamic, symbol => '$x';
done;
View
7 S32-io/IO-Socket-INET.t
@@ -3,6 +3,13 @@ use Test;
plan 41;
+{
+ #?rakudo.jvm emit
+ skip_rest('rakudo.jvm systemic failures/OOM error');
+ #?rakudo.jvm emit
+ exit 0;
+}
+
diag "{elapsed} starting tests";
my $elapsed;
sub elapsed {
View
5 S32-io/note.t
@@ -6,6 +6,7 @@ plan 6;
# L<S32::IO/Functions/note>
+#?rakudo.jvm todo "nigh"
is_run( 'note "basic form"',
{
status => 0,
@@ -14,6 +15,7 @@ is_run( 'note "basic form"',
},
'basic form of note' );
+#?rakudo.jvm todo "nigh"
is_run( 'note "multiple", " ", "params"',
{
status => 0,
@@ -22,6 +24,7 @@ is_run( 'note "multiple", " ", "params"',
},
'note multiple parameters' );
+#?rakudo.jvm todo "nigh"
is_run( 'my @a = ("array", "of", "params"); note @a',
{
status => 0,
@@ -30,6 +33,7 @@ is_run( 'my @a = ("array", "of", "params"); note @a',
},
'note array' );
+#?rakudo.jvm todo "nigh"
is_run( 'my $a = <stringify args>; note $a',
{
status => 0,
@@ -48,6 +52,7 @@ is_run( '"method form".note',
},
'method form of note' );
+#?rakudo.jvm todo "nigh"
is_run( 'try { note "with try" }',
{
status => 0,
View
1  S32-io/spurt.t
@@ -58,6 +58,7 @@ sub all-basic(Callable $handle) {
# Corner cases
#?niecza skip "Unable to resolve method open in type IO"
+#?rakudo.jvm skip "java.lang.StackOverflowError"
{
# Spurt on open handle
{
View
4 S32-str/encode.t
@@ -10,7 +10,9 @@ ok ('ab'.encode('ASCII') eqv blob8.new(97, 98)), 'encoding to ASCII';
is 'ab'.encode('ASCII').elems, 2, 'right length of Buf';
ok ('ö'.encode('UTF-8') eqv utf8.new(195, 182)), 'encoding to UTF-8';
is 'ab'.encode('UTF-8').elems, 2, 'right length of Buf';
+#?rakudo.jvm todo "nigh"
is 'ö'.encode('UTF-8')[0], 195, 'indexing a utf8 gives correct value (1)';
+#?rakudo.jvm todo "nigh"
is 'ö'.encode('UTF-8')[1], 182, 'indexing a utf8 gives correct value (1)';
is 'abc'.encode()[0], 97, 'can index one element in a Buf';
@@ -39,7 +41,9 @@ is 'abc'.encode('ascii').list.join(','), '97,98,99', 'Buf.list gives list of cod
ok $temp = "\x1F63E".encode('UTF-16'), 'encode a string to UTF-16 surrogate pair';
ok $temp = utf16.new($temp), 'creating utf16 Buf from a surrogate pair';
+ #?rakudo.jvm todo "nigh"
is $temp[0], 0xD83D, 'indexing a utf16 gives correct value';
+ #?rakudo.jvm todo "nigh"
is $temp[1], 0xDE3E, 'indexing a utf16 gives correct value';
#?rakudo.parrot skip 'VMArray: index out of bounds'
is $temp.decode(), "\x1F63E", 'decoding utf16 Buf to original value';
View
9 integration/error-reporting.t
@@ -7,18 +7,21 @@ BEGIN { @*INC.push('t/spec/packages') };
use Test::Util;
+#?rakudo.jvm todo "nigh"
is_run "use v6;\n'a' =~ /foo/", {
status => { $_ != 0 },
out => '',
err => rx/<<2>>/
}, 'Parse error contains line number';
+#?rakudo.jvm todo "nigh"
is_run "my \$x = 2 * 3;\ndie \$x", {
status => { $_ != 0 },
out => '',
err => all(rx/6/, rx/<<2>>/),
}, 'Runtime error contains line number';
+#?rakudo.jvm todo "nigh"
is_run "use v6;\n\nsay 'Hello';\nsay 'a'.my_non_existent_method_6R5();",
{
status => { $_ != 0 },
@@ -27,6 +30,7 @@ is_run "use v6;\n\nsay 'Hello';\nsay 'a'.my_non_existent_method_6R5();",
}, 'Method not found error mentions method name and line number';
# RT #75446
+#?rakudo.jvm todo "nigh"
is_run 'use v6;
sub bar {
pfff();
@@ -39,6 +43,7 @@ bar()',
err => all(rx/pfff/, rx/<<3>>/),
}, 'got the right line number for nonexisting sub inside another sub';
+#?rakudo.jvm todo "nigh"
is_run 'say 42; nosuchsub()',
{
status => { $_ != 0 },
@@ -61,6 +66,7 @@ is_run 'say 42; nosuchsub()',
}
# RT #76112
+#?rakudo.jvm todo "nigh"
is_run 'use v6;
class A { has $.x is rw };
A.new.x(42);',
@@ -71,6 +77,7 @@ A.new.x(42);',
}, 'got the right line number for accessors';
# RT #80982
+#?rakudo.jvm todo "nigh"
is_run 'say 0080982',
{
status => 0,
@@ -88,6 +95,7 @@ is_run 'my $ = 2; my $ = 3; say q[alive]',
}, 'multiple anonymous variables do not warn or err out';
# RT #112724
+#?rakudo.jvm todo "nigh"
is_run 'sub mysub {
+ Any # trigger an uninitialized warning
};
@@ -100,6 +108,7 @@ is_run 'sub mysub {
# RT #77736
#?niecza todo
+#?rakudo.jvm todo "nigh"
is_run 'die "foo"; END { say "end run" }',
{
status => * != 0,
Please sign in to comment.
Something went wrong with that request. Please try again.