Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion array interpolation question
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Garrett Rooney  
View profile  
 More options Mar 5 2005, 11:25 am
Newsgroups: perl.perl6.compiler
From: roo...@electricjellyfish.net (Garrett Rooney)
Date: Sat, 05 Mar 2005 11:25:09 -0500
Local: Sat, Mar 5 2005 11:25 am
Subject: Re: [pugs] array interpolation question

Garrett Rooney wrote:
> Assuming the spec is correct, here's a patch to add some more tests to
> t/op/string_interpolation.t.

Of course, those should have been todo_is tests...  Here's the right patch.

-garrett

[ array-interp.diff < 1K ]
Index: t/op/string_interpolation.t
===================================================================
--- t/op/string_interpolation.t (revision 574)
+++ t/op/string_interpolation.t (working copy)
@@ -11,7 +11,7 @@

 =cut

-plan 5;
+plan 7;

 my $world = "World";

@@ -23,4 +23,7 @@

 sub list_count (*@args) { +@args }
 my @a = (1,2,3);
-ok(list_count("@a") == 1, 'quoted interpolation gets string context');
+ok(list_count("@a[]") == 1, 'quoted interpolation gets string context');
+
+todo_is("@a", '@a', "array without empty square brackets doesn't interpolate");
+todo_is("@a[]", '1 2 3', 'array with empty square brackets interpolates');


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google