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

[perl #70003] tests available

2 views
Skip to first unread message

kyl...@gmail.com

unread,
Nov 14, 2009, 12:10:06 AM11/14/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 ad5306eaedfd60179a505fce0b2203f0c07712c1
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Sat Nov 14 05:05:15 2009 +0000

[t/spec] Test for RT 70003: $/.orig produces CodeString

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

diff --git a/t/spec/S05-match/capturing-contexts.t b/t/spec/S05-match/capturing-contexts.t
index 93f0e37..8f97ae9 100644
--- a/t/spec/S05-match/capturing-contexts.t
+++ b/t/spec/S05-match/capturing-contexts.t
@@ -102,6 +102,13 @@ is_run( q{'aa' ~~ /(.)$1/},
is $/, 'RT', 'Matched as intended in void context';
}

+# RT #70003
+{
+ 'a' ~~ /a/;
+ #?rakudo skip 'RT 70003'
+ is ($/.orig).rindex('a'), 0, 'rindex() works on $/.orig';
+}
+
done_testing;

# vim: ft=perl6

kyl...@gmail.com

unread,
Nov 14, 2009, 12:10:04 AM11/14/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S06-advanced_subroutine_features/wrap.t

commit e2e985ab474380caa8150cbc81da9ecdd2b2ab80
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Sat Nov 14 05:05:08 2009 +0000

[t/spec] Test for RT 70267: {nextsame}()

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

diff --git a/t/spec/S06-advanced_subroutine_features/wrap.t b/t/spec/S06-advanced_subroutine_features/wrap.t
index 630f119..9ab0ae5 100644
--- a/t/spec/S06-advanced_subroutine_features/wrap.t
+++ b/t/spec/S06-advanced_subroutine_features/wrap.t
@@ -11,7 +11,7 @@ use Test;
# mutating wraps -- those should be "deep", as in not touching coderefs
# but actually mutating how the coderef works.

-plan 60;
+plan *;

my @log;

@@ -166,4 +166,9 @@ is( functionA(), "xz", "First wrapper and final function only, middle removed."
is( functionB, 'xxx', "Wrap is now out of scope, should be back to normal." );
}

+#?rakudo todo 'RT 70267: call to nextsame with nowhere to go'
+dies_ok { {nextsame}() }, '{nextsame}() dies properly';
+
+done_testing;
+
# vim: ft=perl6

kyl...@gmail.com

unread,
Nov 14, 2009, 2:50:04 PM11/14/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/integration/real-strings.t

commit b3197187a377336d0a0ce53ee22d1cc8b1136433
Author: moritz <moritz@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Sat Nov 14 19:47:08 2009 +0000

[t/spec] test for RT #70415, split() should return real strings

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

diff --git a/t/spec/integration/real-strings.t b/t/spec/integration/real-strings.t
index 5b14597..9707aee 100644
--- a/t/spec/integration/real-strings.t
+++ b/t/spec/integration/real-strings.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 11;
+plan *;

# Rakudo had a regression that
# string returned from regexes were Parrot strings, not Perl 6 strings.
@@ -20,6 +20,8 @@ plan 11;
'Still works with strings returned from split() (lives)';
is $x.trans(['a'] => ['b']), 'b',
'Still works with strings returned from split() (result)';
+ $x = 'abc'.split('b').[0];
+ is $x.trans(['a'] => ['b']), 'b', 'same for split(Str)';
}

dies_ok { for "a b c".split(/\s/) -> $foo { $foo = $foo; } }, 'variables returned from split and passed to pointy block are still ro';
@@ -56,4 +58,6 @@ is "helo".lc.trans(("aeiou" => "AEIOU")), 'hElO', '.flip.trans (RT 66300)';
is $x, +%*VM.keys, '%*VM.kv is self-consistent';

kyl...@gmail.com

unread,
Nov 14, 2009, 2:50:05 PM11/14/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/bit.t, t/spec/integration/real-strings.t

commit 5ae130e70da1e0276ef5350a8b93f3605dd3cead
Author: moritz <moritz@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Sat Nov 14 19:47:18 2009 +0000

[t/spec] move tests for RT #67852 to integration/real-strings.t

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

diff --git a/t/spec/S03-operators/bit.t b/t/spec/S03-operators/bit.t
index fde6101..410ae9c 100644
--- a/t/spec/S03-operators/bit.t
+++ b/t/spec/S03-operators/bit.t
@@ -4,7 +4,7 @@ use Test;

# Mostly copied from Perl 5.8.4 s t/op/bop.t

-plan 24;
+plan 22;

# test the bit operators '&', '|', '^', '+<', and '+>'

@@ -98,11 +98,4 @@ plan 24;
#if ("ok \xFF\x{FF}\n" ~& "ok 41\n" eq "ok 41\n") { say "ok 19" } else { say "not ok 19" }
#if ("ok \x{FF}\xFF\n" ~& "ok 42\n" eq "ok 42\n") { say "ok 20" } else { say "not ok 20" }

-# RT #67852
-{
- lives_ok { 'normal'.trans() }, 'can .trans() on normal string';
- #?rakudo todo 'RT #67852'
- lives_ok { ('bit' ~& 'wise').trans() }, 'can .trans() on bitwise result';
-}
-
# vim: ft=perl6
diff --git a/t/spec/integration/real-strings.t b/t/spec/integration/real-strings.t
index 9707aee..6a01298 100644
--- a/t/spec/integration/real-strings.t
+++ b/t/spec/integration/real-strings.t
@@ -58,6 +58,12 @@ is "helo".lc.trans(("aeiou" => "AEIOU")), 'hElO', '.flip.trans (RT 66300)';


is $x, +%*VM.keys, '%*VM.kv is self-consistent';
}

+# RT #67852
+{
+ lives_ok { 'normal'.trans() }, 'can .trans() on normal string';
+ #?rakudo todo 'RT 67852'
+ lives_ok { ('bit' ~& 'wise').trans() }, 'can .trans() on bitwise result';

kyl...@gmail.com

unread,
Nov 15, 2009, 12:55:04 PM11/15/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S06-signature/positional.t

commit 81dba48cd7a6151ac6afc17948e68322aa721fbf
Author: moritz <moritz@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Sun Nov 15 17:50:47 2009 +0000

[t/spec] test for RT #70469, recursion and parameter binding

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

diff --git a/t/spec/S06-signature/positional.t b/t/spec/S06-signature/positional.t
index 4cc6195..0c65e57 100644
--- a/t/spec/S06-signature/positional.t
+++ b/t/spec/S06-signature/positional.t


@@ -1,6 +1,6 @@
use v6;
use Test;

-plan 5;
+plan 6;

sub my_first ($x, $, $ ) { $x };
sub my_second ($, $x, $ ) { $x };
@@ -32,4 +32,14 @@ is my_third( 4, 5, 6), 6, '($, $, $x) works as a signature';
is rt60408_if(42), (42, 42), 'use of @_[0] in an "if" block (RT 60408)';
}

+#?rakudo todo 'RT 70469'
+{
+
+ sub f(@a, $i) {
+ $i ~ "[{map { f($_, $i + 1) }, @a}]"
+ };
+ is f([[], [[]], []], 0), "0[1[] 1[2[]] 1[]]",
+ 'recusion and parameter binding work out fine';
+}
+
# vim: ft=perl6

kyl...@gmail.com

unread,
Nov 16, 2009, 10:35:04 AM11/16/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: misc/pm.txt, t/spec/S02-builtin_data_types/bool.t

commit 6654f90c9d0eb5d302cf716ba8c9a60073ad1a2d
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Mon Nov 16 15:31:30 2009 +0000

[t/spec] Test for RT 66576: .name method on bool values

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

diff --git a/misc/pm.txt b/misc/pm.txt
index f464e5f..9765f5c 100644
--- a/misc/pm.txt
+++ b/misc/pm.txt
@@ -14,10 +14,6 @@ is meant to be used for e.g. map, which needs to work on lists like
(1,2,3), it can't cut constants out, so it seems no more constraining
than :(\$x) too. Should one of them go away?

-Kh-1: Is it true that Bool::True.name should work? Should it return
- the string 'True'?
- I as because of http://rt.perl.org/rt3/Public/Bug/Display.html?id=66576
-
==========

Answered questions:
@@ -116,4 +112,3 @@ declare my or our to make the & alias in the current lexpad, then
"is export" does no more magic than it ordinarily does. I suppose
method aliases are always considered multi when they show up in a
symbol table.
-
diff --git a/t/spec/S02-builtin_data_types/bool.t b/t/spec/S02-builtin_data_types/bool.t
index 95d408e..d5610d9 100644
--- a/t/spec/S02-builtin_data_types/bool.t
+++ b/t/spec/S02-builtin_data_types/bool.t
@@ -60,6 +60,12 @@ is(--$bool, Bool::False, 'Decrement of Bool::False produces Bool::False');
is ('RT65514' but Bool::False), 'RT65514', 'Bool::False works with "but"';
}

+#?rakudo skip 'RT 66576: .name method on bool values'
+{
+ is Bool::True.name, 'True', 'Bool::True.name works (is "True")';
+ is Bool::False.name, 'False', 'Bool::False.name works (is "False")';
+}

kyl...@gmail.com

unread,
Nov 17, 2009, 11:10:04 AM11/17/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S06-advanced_subroutine_features/wrap.t

commit 6e6fb2879cc18f9ecd5afda7b8ee4dd0bb016937
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Tue Nov 17 16:09:39 2009 +0000

[t/spec] Test for RT 66658: .wrap gets lexicals confused

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

diff --git a/t/spec/S06-advanced_subroutine_features/wrap.t b/t/spec/S06-advanced_subroutine_features/wrap.t
index 9ab0ae5..613f42d 100644
--- a/t/spec/S06-advanced_subroutine_features/wrap.t
+++ b/t/spec/S06-advanced_subroutine_features/wrap.t
@@ -169,6 +169,30 @@ is( functionA(), "xz", "First wrapper and final function only, middle removed."


#?rakudo todo 'RT 70267: call to nextsame with nowhere to go'

dies_ok { {nextsame}() }, '{nextsame}() dies properly';

+# RT #66658
+{
+ sub meet( $person ) { return "meet $person" }
+ sub greet( $person ) { return "greet $person" }
+
+ my $wrapped;
+
+ for &greet, &meet -> $wrap {
+ my $name = $wrap.name;
+ $wrap.wrap({ $wrapped = $name; callsame; });
+ }
+
+ ok ! $wrapped.defined, 'wrapper test variable is undefined';
+ is greet('japhb'), 'greet japhb', 'wrapped greet() works';
+ #?rakudo todo 'RT 66658: .wrap gets lexicals confused'
+ is $wrapped, 'greet', 'wrapper sees lexical from time of wrap (greet)';
+
+ undefine $wrapped;
+
+ ok ! $wrapped.defined, 'wrapper test variable is undefined';
+ is meet('masak'), 'meet masak', 'wrapped meet() works';
+ is $wrapped, 'meet', 'wrapper sees lexical from time of wrap (meet)';

kyl...@gmail.com

unread,
Nov 18, 2009, 1:05:05 PM11/18/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S32-num/abs.t

commit d84b6665b07d17de1c196feeac3380bb686172b6
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Wed Nov 18 18:00:50 2009 +0000

[t/spec] Test for RT 70596: parsing of abs(1).WHAT

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

diff --git a/t/spec/S32-num/abs.t b/t/spec/S32-num/abs.t
index 05355b6..8be4da4 100644
--- a/t/spec/S32-num/abs.t
+++ b/t/spec/S32-num/abs.t


@@ -1,6 +1,6 @@
use v6;
use Test;

-plan 59;
+plan *;

# L<S32::Numeric/Num/"=item abs">

@@ -38,4 +38,9 @@ is( abs(-Inf), Inf, 'absolute value of -Inf is Inf');

is( abs("-10"), 10, 'absolute value of "-10" is 10');

+#?rakudo todo 'RT 70596'
+is( abs(70596).WHAT, 70596.abs.WHAT, 'abs(x).WHAT parses as x.abs.WHAT' );
+

kyl...@gmail.com

unread,
Nov 18, 2009, 1:05:07 PM11/18/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S05-mass/rx.t

commit 0c6786e793e5337b073dcbeb1b4b4c0f087429c9
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Wed Nov 18 18:00:56 2009 +0000

[t/spec] Test for RT 70606: null pattern after alternation

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

diff --git a/t/spec/S05-mass/rx.t b/t/spec/S05-mass/rx.t
index 43a361c..b059229 100644
--- a/t/spec/S05-mass/rx.t
+++ b/t/spec/S05-mass/rx.t
@@ -1,6 +1,6 @@
use Test;

-plan 729;
+plan *;

### for now
sub matchcheck(*@) { 1 }
@@ -2461,4 +2461,9 @@ ok eval(q{{ 'abcdef' ~~ // }}) ~~ Failure also /null pattern/, '';
#?rakudo skip 'infix:<also>'
ok eval(q{{ 'abcdef' ~~ / / }}) ~~ Failure also /Null pattern illegal/, 'ws null pattern';

+#?rakudo todo 'RT 70606'
+eval_dies_ok '"b" ~~ /b| /', 'null pattern after alternation';
+
+done_testing;
+
# vim: ft=perl6 sw=4 expandtab

kyl...@gmail.com

unread,
Nov 20, 2009, 3:20:04 PM11/20/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S03-operators/comparison.t

commit 1b64955d678116091d280fee482ec5f3bedc61df
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Fri Nov 20 20:16:12 2009 +0000

[t/spec] Test for RT 70664: Try <=> with rationals

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

diff --git a/t/spec/S03-operators/comparison.t b/t/spec/S03-operators/comparison.t
index cd60f36..4410a66 100644
--- a/t/spec/S03-operators/comparison.t
+++ b/t/spec/S03-operators/comparison.t
@@ -1,7 +1,7 @@
use v6;
use Test;

-plan 18;
+plan *;

# N.B.: relational ops are in relational.t

@@ -18,6 +18,19 @@ is(1 <=> 2, Order::Increase, '1 <=> 2 is increase');
is(2 <=> 1, Order::Decrease, '2 <=> 1 is decrease');
is('a' <=> '1', Order::Increase, '<=> is in numeric context');

+is 0 <=> -1, Order::Decrease, '0 <=> -1 is increase';
+is -1 <=> 0, Order::Increase, '-1 <=> 0 is decrease';
+#?rakudo 2 todo 'RT 70664'
+is 0 <=> -1/2, Order::Decrease, '0 <=> -1/2 is increase';
+is 0 <=> 1/2, Order::Increase, '0 <=> 1/2 is increase';
+#?rakudo 6 skip 'No suitable candidate found for cmp_num, with signature PP->I'
+is -1/2 <=> 0, Order::Increase, '-1/2 <=> 0 is decrease';
+is 1/2 <=> 0, Order::Decrease, '1/2 <=> 0 is decrease';
+is 1/2 <=> 1/2, Order::Same, '1/2 <=> 1/2 is same';
+is -1/2 <=> -1/2, Order::Same, '-1/2 <=> -1/2 is same';
+is 1/2 <=> -1/2, Order::Decrease, '1/2 <=> -1/2 is decrease';
+is -1/2 <=> 1/2, Order::Increase, '-1/2 <=> 1/2 is increase';
+
# leg comparison (Str)
is('a' leg 'a', Order::Same, 'a leg a is same');
is('a' leg 'b', Order::Increase, 'a leg b is increase');
@@ -33,4 +46,6 @@ is(1 cmp 2, Order::Increase, '1 cmp 2 is increase');
is(2 cmp 1, Order::Decrease, '2 cmp 1 is decrease');
is('a' cmp 1, Order::Decrease, '"a" cmp 1 is decrease'); # unspecced but P5 behavior

kyl...@gmail.com

unread,
Nov 20, 2009, 4:20:05 PM11/20/09
to perl6-bug...@perl.org
This is an automatically generated mail to inform you that tests are now available in t/spec/S06-signature/optional.t

commit 84dd4dc4cd0ad0ff1de9e5295090994d1670c068
Author: kyle <kyle@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Fri Nov 20 21:17:16 2009 +0000

[t/spec] Test for RT 66822: required param after optional param

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

diff --git a/t/spec/S06-signature/optional.t b/t/spec/S06-signature/optional.t
index 31cb0d3..74239c2 100644
--- a/t/spec/S06-signature/optional.t
+++ b/t/spec/S06-signature/optional.t
@@ -3,7 +3,7 @@ use Test;

# L<S06/Optional parameters/>

-plan 13;
+plan *;

sub opt1($p?) { defined($p) ?? $p !! 'undef'; }

@@ -61,5 +61,11 @@ dies_ok {foo_53814(1,undef,'something_extra',:y(3))},
# 'two commas parse as if undef is between them';
eval_dies_ok 'rt54804( 1, , 3, )', "two commas in a row doesn't parse";
}
+
+#?rakudo todo 'RT 66822'
+eval_dies_ok( 'sub rt66822($opt?, $req) { "$opt, $req" }',
+ "Can't put required parameter after optional parameters" );
+
+done_testing;

# vim: ft=perl6

Will Coleda via RT

unread,
Sep 19, 2011, 9:21:17 PM9/19/11
to perl6-c...@perl.org
On Fri Nov 13 21:10:30 2009, KyleHa wrote:
> This is an automatically generated mail to inform you that tests are
> now available in t/spec/S06-advanced_subroutine_features/wrap.t

Test is now in t/spec/S06-advanced/wrap.t
--
Will "Coke" Coleda
0 new messages