Skip to content

Commit

Permalink
[t/spec] tests for RT #61914
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@24885 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Jan 11, 2009
1 parent 1c00622 commit 2e82ab2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion S12-attributes/instance.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 90;
plan 92;

=begin pod
Expand Down Expand Up @@ -391,6 +391,18 @@ is eval('Foo9.new.attr'), 42, "default attribute value (3)";
dies_ok { $x.set_hash1 }, 'can not assign to %.hash attribute';
lives_ok { $x.set_array2 }, 'can assign to @!array attribute';
lives_ok { $x.set_hash2 }, 'can assign to %!hash attribute';
}

# test that whitespaces after 'has (' are allowed.
# This used to be a Rakudo bug (RT #61914)
{
class AttribWsTest {
has ( $.this,
$.that,
);
}
my AttribWsTest $o .= new( this => 3, that => 4);
is $o.this, 3, 'could use whitespace after "has ("';
is $o.that, 4, '.. and a newline within the has() declarator';
}
# vim: ft=perl6

0 comments on commit 2e82ab2

Please sign in to comment.