Skip to content

Commit c197d1a

Browse files
H.Merijn Brandjhi
authored andcommitted
Re: format bug report [Patch]
Date: Wed, 05 Jul 2000 13:12:52 +0200 Message-Id: <20000705130745.67BF.H.M.BRAND@hccnet.nl> Subject: Re: format bug report [Patch] From: "H.Merijn Brand" <h.m.brand@hccnet.nl> Date: Wed, 05 Jul 2000 14:10:01 +0200 Message-Id: <20000705140837.73C2.H.M.BRAND@hccnet.nl> p4raw-id: //depot/cfgperl@6340
1 parent f805f8c commit c197d1a

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

t/op/write.t

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!./perl
22

3-
print "1..8\n";
3+
print "1..9\n";
44

55
my $CAT = ($^O eq 'MSWin32') ? 'type' : 'cat';
66

@@ -201,3 +201,19 @@ $this,$that
201201
$that = 8;
202202
write LEX;
203203
}
204+
# LEX_INTERPNORMAL test
205+
my %e = ( a => 1 );
206+
format OUT4 =
207+
@<<<<<<
208+
"$e{a}"
209+
.
210+
open OUT4, ">Op_write.tmp" or die "Can't create Op_write.tmp";
211+
write (OUT4);
212+
close OUT4;
213+
if (`$CAT Op_write.tmp` eq "1\n") {
214+
print "ok 9\n";
215+
unlink "Op_write.tmp";
216+
}
217+
else {
218+
print "not ok 9\n";
219+
}

toke.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,7 +3172,7 @@ Perl_yylex(pTHX)
31723172
yyerror("Unmatched right curly bracket");
31733173
else
31743174
PL_expect = (expectation)PL_lex_brackstack[--PL_lex_brackets];
3175-
if (PL_lex_brackets < PL_lex_formbrack)
3175+
if (PL_lex_brackets < PL_lex_formbrack && PL_lex_state != LEX_INTERPNORMAL)
31763176
PL_lex_formbrack = 0;
31773177
if (PL_lex_state == LEX_INTERPNORMAL) {
31783178
if (PL_lex_brackets == 0) {
@@ -7176,7 +7176,7 @@ S_scan_formline(pTHX_ register char *s)
71767176
bool needargs = FALSE;
71777177

71787178
while (!needargs) {
7179-
if (*s == '.' || *s == '}') {
7179+
if (*s == '.' || *s == /*{*/'}') {
71807180
/*SUPPRESS 530*/
71817181
#ifdef PERL_STRICT_CR
71827182
for (t = s+1;SPACE_OR_TAB(*t); t++) ;

0 commit comments

Comments
 (0)