diff options
author | Gerard Goossen <gerard@ggoossen.net> | 2009-11-24 12:13:13 +0100 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2009-11-25 14:31:28 -0500 |
commit | f706d24c20941a6401e90643488acaa0705ba877 (patch) | |
tree | 86973420cebedcaa1e3342b611600bb35b0010b8 | |
parent | ae28bb2a75e3c50332b2684a214bf3dcd1bdb937 (diff) | |
download | perl-f706d24c20941a6401e90643488acaa0705ba877.tar.gz |
add interpolation test for [perl #70091]
(Updated by Jesse Vincent to put the test in comp rather than a new
toplevel test directory)
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | t/comp/interpolate.t | 15 |
2 files changed, 16 insertions, 0 deletions
@@ -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 0000000000..3472d97cf1 --- /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'); +} |