From: Gerard Goossen Date: Tue, 24 Nov 2009 11:13:13 +0000 (+0100) Subject: add interpolation test for [perl #70091] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f706d24c20941a6401e90643488acaa0705ba877;p=p5sagit%2Fp5-mst-13.2.git add interpolation test for [perl #70091] (Updated by Jesse Vincent to put the test in comp rather than a new toplevel test directory) --- diff --git a/MANIFEST b/MANIFEST index bc4460d..a8f80ed 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4234,6 +4234,7 @@ t/io/tell.t See if file seeking works t/io/through.t See if pipe passes data intact t/io/utf8.t See if file seeking works t/japh/abigail.t Obscure tests +t/comp/interpolate.t See if interpolating strings work t/lib/1_compile.t See if the various libraries and extensions compile t/lib/Cname.pm Test charnames in regexes (op/pat.t) t/lib/common.pl Helper for lib/{warnings,feature}.t diff --git a/t/comp/interpolate.t b/t/comp/interpolate.t new file mode 100644 index 0000000..3472d97 --- /dev/null +++ b/t/comp/interpolate.t @@ -0,0 +1,15 @@ +BEGIN { + require "test.pl" +} + +use strict; +use warnings; + +plan 2; + +{ + my %foo = (aap => "monkey"); + my $foo = ''; + is("@{[$foo{'aap'}]}", 'monkey', 'interpolation of hash lookup with space between lexical variable and subscript'); + is("@{[$foo {'aap'}]}", 'monkey', 'interpolation of hash lookup with space between lexical variable and subscript'); +}