Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec] throw away a wrong test in chained-declarators.t, and fudge …

…for rakudo

git-svn-id: http://svn.pugscode.org/pugs@30466 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit b680ebebb7ab3fb75a73645bcda934f107178789 1 parent cd1caa2
moritz authored
Showing with 3 additions and 11 deletions.
  1. +3 −11 S03-operators/chained-declarators.t
View
14 S03-operators/chained-declarators.t
@@ -7,28 +7,20 @@ use Test;
# but works like Perl 5. Also note that the list if declarators here
# does not match the list described in the referenced specs.
-plan 6;
+plan 5;
# sanity: declarations and very simple use (scoping tests come later)
# we take care to use different names to avoid other *kinds* of insanity.
is((try { my $a1 = my $b1 = 42; $b1++; "$a1, $b1" }), '42, 43', "chained my");
is((try { my $a2 = our $b2 = 42; $b2++; "$a2, $b2" }), '42, 43', "chained my, our");
+#?rakudo skip 'constant'
is((try { my $a4 = constant $b4 = 42; "$a4, $b4" }), '42, 42', "chained my, constant");
+#?rakudo skip 'state'
is((try { my $a5 = state $b5 = 42; $b5++; "$a5, $b5" }), '42, 43', "chained my, state");
# scoping
-#XXX is this one correct? Is $sb1 even known outside the inner block?
-#?rakudo todo 'scoping with chained declarators'
-is((try '
- my $sa1 = 10;
- {
- my $sa1 = our $sb1 = 42;
- }
- "$sa1, $sb1";
- '), '10, 42', "scoping my, our");
-
eval_dies_ok '
{
our $sa2 = my $sb2 = 42;
Please sign in to comment.
Something went wrong with that request. Please try again.