Permalink
Browse files

[t/spec] test for spec change r27054

git-svn-id: http://svn.pugscode.org/pugs@28051 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 27d7b7d commit 126b5cdbd40f22d5ebca6d72cb20db3d3ab19bd1 moritz committed Aug 23, 2009
Showing with 18 additions and 2 deletions.
  1. +18 −1 S02-literals/misc-interpolation.t
  2. +0 −1 TODO
@@ -10,7 +10,7 @@ These tests derived from comments in L<http://use.perl.org/~autrijus/journal/233
=end pod
-plan 40;
+plan 43;
my $world = "World";
my $number = 1;
@@ -93,4 +93,21 @@ is("x \c[ 65, 66, 67 ] x", "x ABC x", "\\c[] allows multiple chars with whi
is("x \x[41,42,43]] x", "x ABC] x", "\\x[] should not eat following ]s");
is("x \c[65,66,67]] x", "x ABC] x", "\\c[] should not eat following ]s");
+# L<S12/Methods/Within an interpolation, the double-quoted form>
+#?rakudo skip 'interpolation of indirect method calls'
+{
+ class InterpolationTest {
+ method f { 'int' }
+ }
+ my $x = InterpolationTest.new;
+
+ # ORLY, STD.pm parses that as an indirect method call. It will warn,
+ # but strictly speaking it's legal.
+ is "|$x.'f'()|", '|int|',
+ 'interpolation of indirect method calls (different quotes)';
+ is "|$x."f"()|", '|int|',
+ 'interpolation of indirect method calls (same quotes)';
+ eval_dies_ok q["|$x."f "()"], '... but whitespaces are not allowed';
+}
+
# vim: ft=perl6
View
1 TODO
@@ -34,7 +34,6 @@ the spec (newest first)
* (r27312) ambiguous authority and 'use'
* (r27091) [S04] require temp semantics for topical statement modifiers
* (r27066) rangechars are not limited to \w anymore
-* (r27054) [S12] dwim on things like: say "Foo = $foo.";
* (r27045) multi method scoping
* (r26968) Now we know how $! work.
* (r26401) Pi/Pf characters are allowed as brackets

0 comments on commit 126b5cd

Please sign in to comment.