Skip to content
Browse files

[t/spec] Lots of unfudging in another interpolation test.

git-svn-id: http://svn.pugscode.org/pugs@30299 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 67e5de7 commit 812a7f5de240021e1052b07801f61b8d85f51b71 jnthn committed Apr 4, 2010
Showing with 4 additions and 12 deletions.
  1. +4 −12 S02-literals/misc-interpolation.t
View
16 S02-literals/misc-interpolation.t
@@ -24,36 +24,29 @@ is("Hello $world", 'Hello World', 'double quoted string interpolation works');
#?rakudo todo 'array interpolation'
is("@list[]\ 3 4", '1 2 3 4', 'double quoted list interpolation works');
is("@list 3 4", '@list 3 4', 'array without empty square brackets does not interpolate');
-#?rakudo todo 'hash interpolation'
+#?rakudo skip 'zen hash slice'
is("%hash{}", "1\t2\n", 'hash interpolation works');
is("%hash", '%hash', 'hash interpolation does not work if not followed by {}');
-#?rakudo todo 'interpolation of &function()'
is("Wont you take me to &func()", 'Wont you take me to func-y town', 'closure interpolation');
is("2 + 2 = { 2+2 }", '2 + 2 = 4', 'double quoted closure interpolation works');
-#?rakudo todo 'interpolation of &function()'
is("&func() is where I live", 'func-y town is where I live', "make sure function interpolation doesn't eat all trailing whitespace");
is("$number {$number}", '1 1', 'number inside and outside closure works');
is("$number {my $number=2}", '1 2', 'local version of number in closure works');
is("$number {my $number=2} $number", '1 2 1', 'original number still available after local version in closure: works' );
-#?rakudo skip 'interpolatin of $(my $x = 2)'
+
{
is "$(my $x = 2) $x", '2 2', 'Variable should interpolate and still be available in the outer scope.';
- is("$(my $x = 2)" ~ $x, '22', 'Variable should interpolate and still be available in the outer scope.');
+ is("$(my $y = 2)" ~ $y, '22', 'Variable should interpolate and still be available in the outer scope.');
}
# L<S02/Names and Variables/form of each subscript>
is("&func. () is where I live", '&func. () is where I live', '"&func. ()" should not interpolate');
-#?rakudo skip 'parse failure'
-#?DOES 1
-{
is("&func_w_args("foo","bar"))", '[foo][bar])', '"&func_w_args(...)" should interpolate');
-}
+
# L<S02/Literals/"In order to interpolate the result of a method call">
-#?rakudo todo 'method interpolation'
is("$world.chars()", '5', 'method calls with parens should interpolate');
is("$world.chars", 'World.chars', 'method calls without parens should not interpolate');
-#?rakudo 2 todo 'method interpolation'
is("$world.flip.chars()", '5', 'cascade of argumentless methods, last ending in paren');
is("$world.substr(0,1)", 'W', 'method calls with parens and args should interpolate');
@@ -94,7 +87,6 @@ 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' }

0 comments on commit 812a7f5

Please sign in to comment.
Something went wrong with that request. Please try again.