summaryrefslogtreecommitdiff
path: root/t/comp
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 /t/comp
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)
Diffstat (limited to 't/comp')
-rw-r--r--t/comp/interpolate.t15
1 files changed, 15 insertions, 0 deletions
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');
+}