Skip to content

Commit 6f5b873

Browse files
committed
Units(Perl): add more cases for testing heredoc recognition
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent cb407ee commit 6f5b873

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

Units/parser-perl.r/no-heredoc.d/expected.tags

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ heredoc4tag input.pl /^print "abc" . <<heredoc3tag . 'efg' . << "heredoc4tag" .
1313
f7tag input.pl /^sub f7tag() {}$/;" s
1414
f8tag input.pl /^sub f8tag() {}$/;" s
1515
f9tag input.pl /^sub f9tag() {}$/;" s
16+
five_sub input-0.pl /^sub five_sub() {$/;" s
17+
five_mark0 input-0.pl /^print 3 + 2 . <<five_mark0;$/;" h
18+
five_mark1 input-0.pl /^print 3 + 2 . <<~five_mark1;$/;" h
19+
five_mark2 input-0.pl /^print 3 + 2 . << "five_mark2";$/;" h
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
print 3 + 2 <<5;
2+
5
3+
;
4+
5+
sub five_sub() {
6+
return 5
7+
}
8+
print 3 + 2 << five_sub;
9+
five
10+
;
11+
12+
print 3 + 2 . <<five_mark0;
13+
a
14+
five_mark0
15+
16+
print 3 + 2 . <<~five_mark1;
17+
a
18+
five_mark1
19+
20+
print 3 + 2 << ~five_sub;
21+
five_sub;
22+
23+
print 3 + 2 . << "five_mark2";
24+
ox
25+
five_mark2
26+
27+
28+
29+
30+
31+

0 commit comments

Comments
 (0)