Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #66204] tests available

0 views
Skip to first unread message

kyl...@gmail.com

unread,
Nov 4, 2009, 3:10:06 PM11/4/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S12-construction/new.t

commit c580fe86e3cb3b391a413b1cffdbe3bcf266c92d
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Wed Nov 4 20:09:15 2009 +0000

[t/spec] Test for RT #66204: NewClass .= new should die

git-svn-id: http://svn.pugscode.org/pugs@28984 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S12-construction/new.t b/t/spec/S12-construction/new.t
index d4c93a3..0be3f8e 100644
--- a/t/spec/S12-construction/new.t
+++ b/t/spec/S12-construction/new.t
@@ -1,7 +1,7 @@
use v6;
use Test;

-plan 12;
+plan *;

class Parent {
has $.x;
@@ -36,4 +36,15 @@ lives_ok { $o = GrandChild.new( Parent{ :x<5> }, Child{ :y(4) }) },
is $o.y, 4, '... worked for the class Child (other order)';
is $o.x, 5, '... worked for the class Parent (other order)';

+# RT #66204
+{
+ class RT66204 {}
+ ok ! RT66204.defined, 'NewClass is not .defined';
+ #?rakudo 2 todo 'RT 66204'
+ dies_ok { RT66204 .= new }, 'class asked to build itself refuses';
+ ok ! RT66204.defined, 'NewClass is still not .defined';
+}
+
+done_testing;
+
# vim: ft=perl6

kyl...@gmail.com

unread,
Nov 4, 2009, 3:10:05 PM11/4/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S14-roles/basic.t

commit 3b1dce088eaa08359462cfb39faebeffaae06f92
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Wed Nov 4 20:09:07 2009 +0000

[t/spec] Test for RT 66178: "but" with nonexistent role

git-svn-id: http://svn.pugscode.org/pugs@28983 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S14-roles/basic.t b/t/spec/S14-roles/basic.t
index c702800..90def11 100644
--- a/t/spec/S14-roles/basic.t
+++ b/t/spec/S14-roles/basic.t
@@ -2,7 +2,7 @@ use v6;

use Test;

-plan 33;
+plan *;

=begin description

@@ -102,4 +102,9 @@ ok D ~~ Role, 'a role does the Role type';
'can compile "class does Int"';
}

+#?rakudo todo 'RT 66178'
+eval_dies_ok '0 but RT66178', '"but" with non-existent role dies';

kyl...@gmail.com

unread,
Nov 4, 2009, 3:25:04 PM11/4/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S05-match/capturing-contexts.t

commit 3ace0ce336a3780127e8d1ef8f5e4c62dc446c96
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Wed Nov 4 20:23:35 2009 +0000

[t/spec] Test for RT 66252: match in void context does not set $/

git-svn-id: http://svn.pugscode.org/pugs@28985 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S05-match/capturing-contexts.t b/t/spec/S05-match/capturing-contexts.t
index 609480f..93f0e37 100644
--- a/t/spec/S05-match/capturing-contexts.t
+++ b/t/spec/S05-match/capturing-contexts.t
@@ -93,6 +93,15 @@ is_run( q{'aa' ~~ /(.)$1/},
},
'match with non-existent capture emits a warning' );

+# RT #66252
+{
+ $_ = 'RT 66252';
+ /(R.)/;
+ #?rakudo 2 todo 'RT 66252'
+ isa_ok $/, 'Match', 'Match object in $/ after match in void context';
+ is $/, 'RT', 'Matched as intended in void context';
+}
+
done_testing;

# vim: ft=perl6

kyl...@gmail.com

unread,
Nov 4, 2009, 4:00:04 PM11/4/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/lists.t

commit f875d2ccaeddf929238237855d0f0cc57ec5a1e6
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Wed Nov 4 20:55:10 2009 +0000

[t/spec] Test for RT #66304: list promoted to array when assigned to scalar

git-svn-id: http://svn.pugscode.org/pugs@28986 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S02-builtin_data_types/lists.t b/t/spec/S02-builtin_data_types/lists.t
index f8fdf0d..6eda0bb 100644
--- a/t/spec/S02-builtin_data_types/lists.t
+++ b/t/spec/S02-builtin_data_types/lists.t
@@ -7,7 +7,7 @@ use Test;
# for this test. See
# L<"http://www.nntp.perl.org/group/perl.perl6.language/22924">

-plan 21;
+plan *;

# Indexing lists
{
@@ -144,4 +144,23 @@ plan 21;
is <1 2 3>.rt62836_x, 62836, 'call user-declared method in List:: class';
}

+# RT #66304
+{
+ my $rt66304 = (1, 2, 4);
+ isa_ok $rt66304, List, 'List assigned to scalar is-a List';
+ #?rakudo 3 todo 'RT 66304'
+ is( $rt66304.WHAT, (1, 2, 4).WHAT,
+ 'List.WHAT is the same as .WHAT of list assigned to scalar' );
+ dies_ok { $rt66304[1] = 'ro' }, 'literal List element is immutable';
+ is $rt66304, (1, 2, 4), 'List is not changed by attempted assignment';
+
+ my $x = 44;
+ $rt66304 = ( 11, $x, 22 );
+ lives_ok { $rt66304[1] = 'rw' }, 'variable List element is mutable';
+ #?rakudo todo 'RT 66304'
+ is $x, 'rw', 'variable changed via assignment to list element';
+}

kyl...@gmail.com

unread,
Nov 4, 2009, 5:50:05 PM11/4/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S32-str/comb.t

commit 98a4c823e8c9b7c249c0350ea76a373b48e770f6
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Wed Nov 4 22:46:09 2009 +0000

[t/spec] Test for RT #66340: .comb allows code

git-svn-id: http://svn.pugscode.org/pugs@28988 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S32-str/comb.t b/t/spec/S32-str/comb.t
index fffc44e..421b0f5 100644
--- a/t/spec/S32-str/comb.t
+++ b/t/spec/S32-str/comb.t


@@ -2,7 +2,7 @@ use v6;

use Test;

-plan 29;
+plan *;

# L<S32::Str/Str/=item comb>

@@ -79,5 +79,22 @@ is (<a ab>, <bc ad ba>).comb(m:Perl5/\S*a\S*/), <a ab ad ba>,
is @l[1].to, 8, '.to of the second item is correct';
}

+# RT #66340
+{
+ my $expected_reason = rx/^'No applicable candidates '/;
+
+ try { 'RT 66340'.comb( 1 ) };
+ ok $! ~~ Exception, '.comb(1) dies';
+ ok "$!" ~~ $expected_reason, '.comb(1) dies for the expected reason';
+
+ my $calls = 0;
+ try { 'RT 66340'.comb( { $calls++ } ) };
+ #?rakudo 3 todo 'RT 66340'
+ is $calls, 0, 'code passed to .comb is not called';
+ ok $! ~~ Exception, '.comb({...}) dies';
+ ok "$!" ~~ $expected_reason, '.comb({...}) dies for the expected reason';
+}
+
+done_testing;

# vim: ft=perl6

kyl...@gmail.com

unread,
Nov 4, 2009, 11:25:04 PM11/4/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in at least one of these files: t/spec/S03-operators/short-circuit.t, t/spec/S04-exceptions/fail.t

commit 9d4db0effc2d433218ba67408b981378ba592a10
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Thu Nov 5 04:20:12 2009 +0000

[t/spec] Tests for RT 70229: Failure stringifies wrong, etc.

git-svn-id: http://svn.pugscode.org/pugs@28990 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S03-operators/short-circuit.t b/t/spec/S03-operators/short-circuit.t
index 7864a33..5300ef2 100644
--- a/t/spec/S03-operators/short-circuit.t
+++ b/t/spec/S03-operators/short-circuit.t
@@ -14,7 +14,7 @@ it is closely related to || and && and //.

# test cases by Andrew Savige

-plan 36;
+plan *;

{
my $x = 1;
@@ -111,8 +111,9 @@ plan 36;

is(0 ^^ 42, 42, "^^ operator working (one true)");
is(42 ^^ 0, 42, "^^ operator working (one true)");
- ok(!(1 ^^ 42), "^^ operator working (both true)");
- ok(!(0 ^^ 0), "^^ operator working (both false)");
+ #?rakudo 2 todo 'RT 70229'
+ ok((1 ^^ 42) === (?0), "^^ operator working (both true)");
+ ok((0 ^^ 0) === (?0), "^^ operator working (both false)");
is((0 xor 42), 42, "xor operator working (one true)");
is((42 xor 0), 42, "xor operator working (one true)");
is((0 xor 42), 42, "xor operator working (one true)");
@@ -168,4 +169,6 @@ plan 36;
is c($b), 2, 'shortcircuit idiom given undef works';


}

+done_testing;
+
# vim: ft=perl6

diff --git a/t/spec/S04-exceptions/fail.t b/t/spec/S04-exceptions/fail.t
index 25cb9e7..1167d6c 100644
--- a/t/spec/S04-exceptions/fail.t
+++ b/t/spec/S04-exceptions/fail.t


@@ -2,7 +2,7 @@ use v6;

use Test;

-plan 6;
+plan *;

# L<S04/Exceptions/The fail function>

@@ -40,4 +40,15 @@ plan 6;
ok repeat() ~~ Failure, 'sub typed Int can return Failure';
}

+# RT #70229
+{
+ sub rt70229 { return fail() }
+ my $rt70229 = rt70229();
+ ok $rt70229 ~~ Failure, 'got a Failure';
+ #?rakudo todo 'RT 70229'
+ dies_ok { "$rt70229" }, 'attempt to stringify Failure dies';

kyl...@gmail.com

unread,
Nov 13, 2009, 2:10:06 PM11/13/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in at least one of these files: t/spec/S02-magicals/dollar_bang.t, t/spec/S06-multi/by-trait.t

commit a264981ad5f9439aec2e797a9c35b55d354183b1
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Fri Nov 13 19:05:21 2009 +0000

[t/spec] Tests for RT 66588

git-svn-id: http://svn.pugscode.org/pugs@29071 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S02-magicals/dollar_bang.t b/t/spec/S02-magicals/dollar_bang.t
index 3b33e06..b283493 100644
--- a/t/spec/S02-magicals/dollar_bang.t
+++ b/t/spec/S02-magicals/dollar_bang.t
@@ -40,7 +40,7 @@ ok $!, 'Dividing one by zero sets $!';
sub incr ( $a is rw ) { $a++ };
undefine $!;
try { incr(19) };
-#?rakudo todo 'containers/values'
+#?rakudo todo 'RT 66588: containers/values'
ok $!, 'Modifying a constant sets $!';

try {
diff --git a/t/spec/S06-multi/by-trait.t b/t/spec/S06-multi/by-trait.t
new file mode 100644
index 0000000..45b33df
--- /dev/null
+++ b/t/spec/S06-multi/by-trait.t
@@ -0,0 +1,23 @@
+use v6;
+use Test;
+plan *;
+
+{
+ my $ro_call = 0;
+ my $rw_call = 0;
+ sub uno_mas( Int $ro ) { $ro_call++; return 1 + $ro }
+ sub uno_mas( Int $rw is rw ) { $rw_call++; return ++$rw }
+
+ is uno_mas(42), 43, 'multi works with constant';
+ is $ro_call, 1, 'read-only multi was called';
+
+ my $x = 99;
+ is uno_mas( $x ), 100, 'multi works with variable';
+ #?rakudo 2 todo 'RT 66588: multi dispatch by trait'
+ is $x, 100, 'variable was modified';
+ is $rw_call, 1, 'read-write multi was called';
+}
+
+done_testing;
+
+# vim: ft=perl6

kyl...@gmail.com

unread,
Nov 13, 2009, 2:10:05 PM11/13/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S02-literals/quoting-unicode.t

commit 8cac88ed49a48592f4bdadfde9b49d19c4a6314d
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Fri Nov 13 19:05:13 2009 +0000

[t/spec] Test for RT 66498: quoting regex with snowman and comet

git-svn-id: http://svn.pugscode.org/pugs@29070 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S02-literals/quoting-unicode.t b/t/spec/S02-literals/quoting-unicode.t
index 4d6ba4a..d7ba843 100644
--- a/t/spec/S02-literals/quoting-unicode.t
+++ b/t/spec/S02-literals/quoting-unicode.t
@@ -1,7 +1,6 @@


use v6;
use Test;
-

-plan 70;
+plan *;

#L<S02/Literals>
# TODO:
@@ -74,4 +73,15 @@ RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER(U+298D/U+298E)';
is $var, 'b', 'q-style string with LEFT/RIGHT ANGLE BRACKET';
}

+# RT #66498
+{
+ eval_dies_ok "q\c[SNOWMAN].\c[COMET]",
+ "Can't quote a string with a snowman and comet (U+2603 and U+2604)";
+ #?rakudo todo 'RT 66498'
+ eval_dies_ok "'RT 66498' ~~ m\c[SNOWMAN].\c[COMET]",
+ "Can't quote a regex with a snowman and comet (U+2603 and U+2604)";

kyl...@gmail.com

unread,
Nov 13, 2009, 3:30:04 PM11/13/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S04-statement-modifiers/for.t

commit cc3f58e0638a869318e8324788921bdae87c27df
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Fri Nov 13 20:28:58 2009 +0000

[t/spec] Test for RT 66622: statement mod "for" makes no implicit block

git-svn-id: http://svn.pugscode.org/pugs@29074 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S04-statement-modifiers/for.t b/t/spec/S04-statement-modifiers/for.t
index 02bc888..811240b 100644
--- a/t/spec/S04-statement-modifiers/for.t
+++ b/t/spec/S04-statement-modifiers/for.t
@@ -2,7 +2,7 @@ use v6;

use Test;

-plan 16;
+plan *;

# L<S04/"Conditional statements"/Conditional statement modifiers work as in Perl 5>

@@ -103,4 +103,13 @@ plan 16;
is $_, 42, '"for" statement modifier restored $_ of outer block';
}

+# RT 66622
+{
+ my $rt66622 = 66622 for 1, 2, 3;
+ #?rakudo skip 'RT 66622'
+ is $rt66622, 66622, 'statement modifier "for" makes no implicit block';

kyl...@gmail.com

unread,
Nov 13, 2009, 4:45:03 PM11/13/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S04-declarations/constant.t

commit ea680b34f183a7ff07c91805a8d04f04400bc8ae
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Fri Nov 13 21:41:44 2009 +0000

[t/spec] Label test for RT 66636: package-scoped constant

git-svn-id: http://svn.pugscode.org/pugs@29075 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S04-declarations/constant.t b/t/spec/S04-declarations/constant.t
index e7aa000..c6c5669 100644
--- a/t/spec/S04-declarations/constant.t
+++ b/t/spec/S04-declarations/constant.t
@@ -57,7 +57,7 @@ plan *;
ok $ok, "declaring a constant in terms of another constant works";
}

-#?rakudo skip 'package-scoped constant'
+#?rakudo skip 'RT 66636: package-scoped constant'
{
package ConstantTest {
constant yak = 'shaving';

kyl...@gmail.com

unread,
Nov 13, 2009, 5:00:03 PM11/13/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/enum.t

commit 51ff4729e1d72bb0f22b64a24cfb6ef58380d94d
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Fri Nov 13 21:56:03 2009 +0000

[t/spec] Test for RT 66648: acessing enum element as method

git-svn-id: http://svn.pugscode.org/pugs@29076 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S02-builtin_data_types/enum.t b/t/spec/S02-builtin_data_types/enum.t
index eef3a0b..9c2d72e 100644
--- a/t/spec/S02-builtin_data_types/enum.t
+++ b/t/spec/S02-builtin_data_types/enum.t


@@ -2,7 +2,7 @@ use v6;

use Test;

-plan 35;
+plan *;
# L<S12/Enums>
{
my %hash; eval '%hash = enum «:Mon(1) Tue Wed Thu Fri Sat Sun»';
@@ -131,4 +131,13 @@ is %hash.values, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'), '
is EnumGrammar::G::b, 1, 'enum element in grammar has the right value';
}

+# RT 66648
+{
+ enum RT66648 <a b c>;
+ #?rakudo todo 'RT 66648'
+ dies_ok { RT66648.c }, 'die attempting to access enum item as method';

kyl...@gmail.com

unread,
Nov 13, 2009, 5:40:03 PM11/13/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S12-methods/what.t

commit 013cd2cf8344f2818fa5be4eca415aae5bf85140
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Fri Nov 13 22:39:55 2009 +0000

[t/spec] Test for RT 70237: assignment to .WHAT dies

git-svn-id: http://svn.pugscode.org/pugs@29077 c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S12-methods/what.t b/t/spec/S12-methods/what.t
index 53ab114..b2c9a69 100644
--- a/t/spec/S12-methods/what.t
+++ b/t/spec/S12-methods/what.t
@@ -90,6 +90,14 @@ is 6.02e23.WHAT, Num, 'decimal using "e" is a Num';
is 1.23456.WHAT, Rat, 'decimal without "e" is Rat';
ok 1.1 == 11/10, 'decimal == the equivalent rational';

+# RT #70237
+{
+ is ~1.WHAT, 'Int()', '1.WHAT sanity';
+ #?rakudo 2 todo 'RT 70237: assignment to .WHAT dies'
+ dies_ok { Int.WHAT = Str }, '.WHAT is readonly';
+ is ~2.WHAT, 'Int()', 'assignment to Int.WHAT does nothing';

0 new messages