summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.compulink.co.uk>1997-01-21 00:53:44 +0000
committerChip Salzenberg <chip@atlantic.net>1997-01-25 15:58:00 +1200
commit2ba53c5797ec83a657fa7f6809a84f6f770569be (patch)
tree41814875ce28188e48f5ff8ca4efbf2790889f3d
parentda199366aa5ce8c7b022c7fe15903f820a6cd708 (diff)
downloadperl-2ba53c5797ec83a657fa7f6809a84f6f770569be.tar.gz
Test nested here-docs
Subject: Re: Nested here-docs p5p-msgid: <199701210053.AAA02139@crypt.compulink.co.uk>
-rwxr-xr-xt/base/lex.t28
1 files changed, 21 insertions, 7 deletions
diff --git a/t/base/lex.t b/t/base/lex.t
index f25cd2a12c..7e0ca70fd7 100755
--- a/t/base/lex.t
+++ b/t/base/lex.t
@@ -2,7 +2,7 @@
# $RCSfile: lex.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:04 $
-print "1..24\n";
+print "1..26\n";
$x = 'x';
@@ -76,16 +76,30 @@ ok 18
# previous line intentionally left blank.
+print <<E1 eq "foo\n\n" ? "ok 19\n" : "not ok 19\n";
+@{[ <<E2 ]}
+foo
+E2
+E1
+
+print <<E1 eq "foo\n\n" ? "ok 20\n" : "not ok 20\n";
+@{[
+ <<E2
+foo
+E2
+]}
+E1
+
$foo = FOO;
$bar = BAR;
$foo{$bar} = BAZ;
$ary[0] = ABC;
-print "$foo{$bar}" eq "BAZ" ? "ok 19\n" : "not ok 19\n";
+print "$foo{$bar}" eq "BAZ" ? "ok 21\n" : "not ok 21\n";
-print "${foo}{$bar}" eq "FOO{BAR}" ? "ok 20\n" : "not ok 20\n";
-print "${foo{$bar}}" eq "BAZ" ? "ok 21\n" : "not ok 21\n";
+print "${foo}{$bar}" eq "FOO{BAR}" ? "ok 22\n" : "not ok 22\n";
+print "${foo{$bar}}" eq "BAZ" ? "ok 23\n" : "not ok 23\n";
-print "FOO:" =~ /$foo[:]/ ? "ok 22\n" : "not ok 22\n";
-print "ABC" =~ /^$ary[$A]$/ ? "ok 23\n" : "not ok 23\n";
-print "FOOZ" =~ /^$foo[$A-Z]$/ ? "ok 24\n" : "not ok 24\n";
+print "FOO:" =~ /$foo[:]/ ? "ok 24\n" : "not ok 24\n";
+print "ABC" =~ /^$ary[$A]$/ ? "ok 25\n" : "not ok 25\n";
+print "FOOZ" =~ /^$foo[$A-Z]$/ ? "ok 26\n" : "not ok 26\n";