summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerard Goossen <gerard@ggoossen.net>2009-11-24 12:13:13 +0100
committerJesse Vincent <jesse@bestpractical.com>2009-11-25 14:31:28 -0500
commitf706d24c20941a6401e90643488acaa0705ba877 (patch)
tree86973420cebedcaa1e3342b611600bb35b0010b8
parentae28bb2a75e3c50332b2684a214bf3dcd1bdb937 (diff)
downloadperl-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--MANIFEST1
-rw-r--r--t/comp/interpolate.t15
2 files changed, 16 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index bc4460dad9..a8f80edc96 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 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');
+}