Skip to content

Commit f574a43

Browse files
committed
(GH-1417) Add folding tests for double quote here strings
Previously only single quoted here strings were tested for folding. This commit adds a test for the double quoted herestrings as well.
1 parent 848848a commit f574a43

File tree

3 files changed

+24
-12
lines changed

3 files changed

+24
-12
lines changed

test/features/folding.test.ts

+14-12
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ suite("Features", () => {
4545

4646
const expected = [
4747
{ start: 1, end: 6, kind: 1 },
48-
{ start: 7, end: 46, kind: 3 },
48+
{ start: 7, end: 51, kind: 3 },
4949
{ start: 8, end: 13, kind: 1 },
5050
{ start: 14, end: 17, kind: 3 },
51-
{ start: 21, end: 23, kind: 1 },
52-
{ start: 25, end: 35, kind: 3 },
53-
{ start: 27, end: 31, kind: 3 },
54-
{ start: 37, end: 39, kind: 3 },
55-
{ start: 42, end: 45, kind: 3 },
51+
{ start: 19, end: 22, kind: 3 },
52+
{ start: 26, end: 28, kind: 1 },
53+
{ start: 30, end: 40, kind: 3 },
54+
{ start: 32, end: 36, kind: 3 },
55+
{ start: 42, end: 44, kind: 3 },
56+
{ start: 47, end: 50, kind: 3 },
5657
];
5758

5859
assertFoldingRegions(result, expected);
@@ -67,14 +68,15 @@ suite("Features", () => {
6768

6869
const expected = [
6970
{ start: 1, end: 6, kind: 1 },
70-
{ start: 7, end: 46, kind: 3 },
71+
{ start: 7, end: 51, kind: 3 },
7172
{ start: 8, end: 13, kind: 1 },
7273
{ start: 14, end: 17, kind: 3 },
73-
{ start: 21, end: 23, kind: 1 },
74-
{ start: 25, end: 35, kind: 3 },
75-
{ start: 27, end: 31, kind: 3 },
76-
{ start: 37, end: 39, kind: 3 },
77-
{ start: 42, end: 45, kind: 3 },
74+
{ start: 19, end: 22, kind: 3 },
75+
{ start: 26, end: 28, kind: 1 },
76+
{ start: 30, end: 40, kind: 3 },
77+
{ start: 32, end: 36, kind: 3 },
78+
{ start: 42, end: 44, kind: 3 },
79+
{ start: 47, end: 50, kind: 3 },
7880
];
7981

8082
assertFoldingRegions(result, expected);

test/fixtures/folding-crlf.ps1

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ herestrings should fold
1717
1818
'@
1919

20+
$I = @"
21+
double quoted herestrings should also fold
22+
23+
"@
24+
2025
# this won't be folded
2126

2227
# This block of comments should be foldable as a single block

test/fixtures/folding-lf.ps1

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ herestrings should fold
1717
1818
'@
1919

20+
$I = @"
21+
double quoted herestrings should also fold
22+
23+
"@
24+
2025
# this won't be folded
2126

2227
# This block of comments should be foldable as a single block

0 commit comments

Comments
 (0)