Skip to content

Commit

Permalink
Batch #24 of roast RT -> GH ticket migration
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jan 25, 2020
1 parent d03ba41 commit 34ecff0
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 29 deletions.
7 changes: 5 additions & 2 deletions APPENDICES/A02-some-day-maybe/misc.t
Expand Up @@ -15,7 +15,7 @@ plan 6;
throws-like *+42:foo, X::Syntax::Adverb, :what{.so},
'error in Whatever closure with adverb mentions what cannot be adverbed';

# RT #131414
# https://github.com/Raku/old-issue-tracker/issues/6299
subtest 'same exception with and without type smiley for failing coercion on var' => {
plan 3;
my \XSVB = X::Syntax::Variable::BadType;
Expand All @@ -31,7 +31,8 @@ subtest 'attempting to use defaults with slurpy parameters throws' => {
for @slurpies;
}

{ # RT#126979
# https://github.com/Raku/old-issue-tracker/issues/4900
{
my @a[;];
pass 'shaped array declaration without numbers does not infini-loop';
}
Expand All @@ -50,3 +51,5 @@ group-of 4 => '.pick/.grab/.kxxv with undecided semantics' => {
'cannot call kxxv on Mix';

}

# vim: ft=perl6
12 changes: 8 additions & 4 deletions APPENDICES/A02-some-day-maybe/multi-no-match.t
Expand Up @@ -10,7 +10,8 @@ use Test;

plan 16;

{ # RT #129773
# https://github.com/Raku/old-issue-tracker/issues/5710
{
throws-like { [].splice: 0, [] }, X::Multi::NoMatch,
'.splice(offset, array) throws';
throws-like { [].splice: 0e0, 0 }, X::Multi::NoMatch,
Expand Down Expand Up @@ -41,14 +42,15 @@ dies-ok { 42.lines: |<bunch of incorrect args> },
throws-like { "".match: Nil }, X::Multi::NoMatch,
'.match with Nil matcher does not hang';

{ # RT#131339
# https://github.com/Raku/old-issue-tracker/issues/6259
{
throws-like { Pair.new: <foo bar ber meow>, <meows>, 42 }, X::Multi::NoMatch,
'Pair.new with wrong positional args does not go to Mu.new';
throws-like { Pair.new: :42a }, X::Multi::NoMatch,
'Pair.new with wrong named args does not go to Mu.new';
}

# RT #131490
# https://github.com/Raku/old-issue-tracker/issues/6308
subtest "Junction.new does not use Mu.new's candidates" => {
plan 3;
throws-like { Junction.new: 42 }, X::Multi::NoMatch, 'positional';
Expand All @@ -66,6 +68,8 @@ throws-like { Int.new: <a b c>, 42, 'meow', 'wrong', 'args' },
'Range.new with wrong args does not claim it takes only named args';
}

# RT #127016
# https://github.com/Raku/old-issue-tracker/issues/4921
dies-ok { Date.new(Int, 1, 1) },
'dies when its year is given as an Int type object';

# vim: ft=perl6
4 changes: 2 additions & 2 deletions S06-advanced/callsame.t
Expand Up @@ -2,7 +2,7 @@ use v6;
use Test;
plan 3;

# RT #71754
# https://github.com/Raku/old-issue-tracker/issues/1461
{
my @called;
multi rt71754( Numeric $x ) { #OK not used
Expand All @@ -16,7 +16,7 @@ plan 3;
is @called, <Int Numeric>, 'multi with "callsame" worked';
}

# RT #69314
# https://github.com/Raku/old-issue-tracker/issues/1310
{
# NOTE: do NOT eval this code using Test.pm6's routines as then we would
# depend on whether or not those routines are implemented as multies
Expand Down
10 changes: 5 additions & 5 deletions S32-basics/warn.t
Expand Up @@ -5,8 +5,8 @@ use Test::Util;

plan 10;

# https://github.com/Raku/old-issue-tracker/issues/1338
{
# RT #69520
my $alive = 0;
try {
warn "# It's OK to see this warning during a test run";
Expand All @@ -24,7 +24,7 @@ plan 10;
ok $caught, 'CONTROL catches exceptions'
}

# RT #73768
# https://github.com/Raku/old-issue-tracker/issues/1621
{
my $caught = 0;
{
Expand All @@ -42,7 +42,7 @@ is_run 'use v6; warn; say "alive"',
},
'warn() without arguments';

# RT #124767
# https://github.com/Raku/old-issue-tracker/issues/3987
is_run 'use v6; warn("OH NOEZ"); say "alive"',
{
status => 0,
Expand All @@ -67,15 +67,15 @@ is_run 'use v6; quietly {warn("OH NOEZ") }; say "alive"',
},
'quietly suppresses warnings';

# RT #132549
# https://github.com/Raku/old-issue-tracker/issues/6647
is_run
warn <foo-1 foo-2 foo-3>.all;
warn ('foo-4', ('foo-5', 'foo-6').any).all
, {:out(''), :0status, :err{
.contains: <foo-1 foo-2 foo-3 foo-4 foo-5 foo-6>.all
}}, 'no crashes or hangs with Junctions in warn()';

# R#1833
# https://github.com/rakudo/rakudo/issues/1833
{
my int $warnings;
{
Expand Down
14 changes: 8 additions & 6 deletions S32-io/IO-Socket-INET.t
Expand Up @@ -68,14 +68,14 @@ do-test
is $^client.recv(26), ([~] 'a' .. 'z'), "remaining 26 were buffered";

# Multibyte characters
# RT #115862
# https://github.com/Raku/old-issue-tracker/issues/2981
$received = $^client.recv(1);
is $received, chr(0xA001), "received {chr 0xA001}";
is $received.chars, 1, "... which is 1 character";

$received = $^client.recv(1);
is $received.chars, 1, "received another character";
# RT #115862
# https://github.com/Raku/old-issue-tracker/issues/2981
is $received, chr(0xA002), "combined the bytes form {chr 0xA002}";

$^client.close();
Expand Down Expand Up @@ -114,7 +114,7 @@ do-test
$received = $^client.get();
is $received, 'All mimsy were the borogoves,',
"\\r\\n separator";
# RT #109306
# https://github.com/Raku/old-issue-tracker/issues/2627
is $received.encode('ascii').elems, 29,
"\\r was not left behind on the string";

Expand Down Expand Up @@ -166,7 +166,8 @@ do-test
$^client.close();
};

# RT #116288, test 6 tests read with a parameter
# https://github.com/Raku/old-issue-tracker/issues/3020
# test 6 tests read with a parameter
do-test
# server
{
Expand Down Expand Up @@ -310,10 +311,11 @@ do-test

if $*DISTRO.is-win or # test for WSL below
$*KERNEL.name eq "linux" and $*KERNEL.release ~~ /:i <|w>Microsoft<|w>/ {
skip 'Winsock 1 second delay for connection failure RT #130892', 1
# https://github.com/Raku/old-issue-tracker/issues/6094
skip 'Winsock 1 second delay for connection failure', 1
}
else {
# MoarVM #234
# https://github.com/MoarVM/MoarVM/issues/234
eval-lives-ok 'for ^2000 { IO::Socket::INET.new( :0port, :host<127.0.0.1> ); CATCH {next}; next }',
'Surviving without SEGV due to incorrect socket connect/close handling';
}
Expand Down
2 changes: 1 addition & 1 deletion S32-io/copy.t
Expand Up @@ -90,7 +90,7 @@ nok $non-existent-file.IO.e, "It doesn't";
ok unlink($existing-file), 'file has been removed';
ok unlink($zero-length-file), 'file has been removed';

# RT#131242
# https://github.com/Raku/old-issue-tracker/issues/6216
subtest 'copying when target and source are same file' => {
plan 2;
my $file = make-temp-file :content<foo>;
Expand Down
4 changes: 2 additions & 2 deletions S32-io/dir.t
Expand Up @@ -32,7 +32,7 @@ nok dir( test=> none('.', '..', 't') ).grep(*.basename eq 't'), "can exclude t/

is dir('t').[0].dirname, 't', 'dir("t") returns paths with .dirname of "t"';

# RT #123308
# https://github.com/Raku/old-issue-tracker/issues/3593
{
my $res = dir "/";
ok $res !~~ m/ "/" ** 2 /,
Expand Down Expand Up @@ -62,7 +62,7 @@ subtest "dir-created IO::Paths' absoluteness controlled by invocant" => {
cmp-ok +@files, '==', +@files.grep({ .is-absolute}), 'absolute invocant';
}

# RT #132675
# https://github.com/Raku/old-issue-tracker/issues/6658
subtest '.dir with relative paths sets right CWD' => {
plan 3;
(((my $dir := make-temp-dir).add('meow').mkdir).add('foos')).spurt: 'pass';
Expand Down
2 changes: 1 addition & 1 deletion S32-io/io-path-subclasses.t
Expand Up @@ -18,7 +18,7 @@ plan 9;
}
}

# RT#128840
# https://github.com/Raku/old-issue-tracker/issues/5531
isnt IO::Path::QNX.new("-a").absolute, '',
'.absolute on paths starting with `-` does not produce empty string (QNX)';

Expand Down
2 changes: 1 addition & 1 deletion S32-io/move.t
Expand Up @@ -80,7 +80,7 @@ nok $non-existent-file.IO.e, "sanity check 2";
ok unlink($existing-file1), 'clean-up 3';
ok unlink($existing-file2), 'clean-up 4';

# RT#131242
# https://github.com/Raku/old-issue-tracker/issues/6216
subtest 'moving when target and source are same file' => {
plan 2;
my $file = make-temp-file :content<foo>;
Expand Down
2 changes: 1 addition & 1 deletion S32-io/socket-host-port-split.t
@@ -1,7 +1,7 @@
use v6;
use Test;

# RT #130474
# https://github.com/Raku/old-issue-tracker/issues/5960

plan 2;

Expand Down
13 changes: 9 additions & 4 deletions S32-io/spurt.t
Expand Up @@ -131,7 +131,7 @@ if $path.IO.e {
unlink $path;
}

# RT #126006
# https://github.com/Raku/old-issue-tracker/issues/4520
{
given 'temp-file-RT-126006-test'.IO {
LEAVE .unlink;
Expand Down Expand Up @@ -177,7 +177,8 @@ if $path.IO.e {

test-spurt make-temp-file(), $str;
test-spurt make-temp-file(), $str, :meth;
#?rakudo.jvm 2 todo '[io grant] expected: Buf[uint8].new(200); got: Buf[uint8].new(200); maybe caused by RT #128041'
# https://github.com/Raku/old-issue-tracker/issues/5283
#?rakudo.jvm 2 todo '[io grant] expected: Buf[uint8].new(200); got: Buf[uint8].new(200)'
test-spurt make-temp-file(), $bin;
test-spurt make-temp-file(), $bin, :meth;

Expand All @@ -199,7 +200,8 @@ if $path.IO.e {

test-spurt make-temp-file(), $lstr, :enc<Latin-1>;
test-spurt make-temp-file(), $lstr, :enc<Latin-1>, :meth;
#?rakudo.jvm 2 todo '[io grant] expected: Buf[uint8].new(200); got: Buf[uint8].new(200); maybe caused by RT #128041'
# https://github.com/Raku/old-issue-tracker/issues/5283
#?rakudo.jvm 2 todo '[io grant] expected: Buf[uint8].new(200); got: Buf[uint8].new(200)'
test-spurt make-temp-file(), $lbin;
test-spurt make-temp-file(), $lbin, :meth;

Expand All @@ -226,7 +228,8 @@ subtest 'IO::Handle spurt' => { # 2017 IO Grant; IO::Handle.spurt
ok $fh.spurt( Buf.new: 200), 'can spurt a Blob [method]';
ok spurt($fh, Buf.new: 200), 'can spurt a Blob [sub]';
$fh.close;
#?rakudo.jvm todo 'problem with Buf[uint8], probably related to RT #128041'
# https://github.com/Raku/old-issue-tracker/issues/5283
#?rakudo.jvm todo 'problem with Buf[uint8]'
is-deeply $file.slurp(:bin), Buf[uint8].new(200, 200),
'Blob spurted contents look right';
}
Expand Down Expand Up @@ -262,3 +265,5 @@ subtest 'IO::Handle spurt' => { # 2017 IO Grant; IO::Handle.spurt
'appended spurt contents look right';
}
}

# vim: ft=perl6

0 comments on commit 34ecff0

Please sign in to comment.