Skip to content

Commit 0a5c12c

Browse files
Added test case for broken if-elses.
1 parent 0632d0c commit 0a5c12c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
4+
////[|if|] (true) {
5+
//// var x = 1;
6+
////}
7+
////[|else if|] ()
8+
////[|else if|]
9+
////[|else|] /* whar garbl */ [|if|] (i/**/f (true) { } else { })
10+
////else
11+
12+
// It would be nice if in the future,
13+
// We could include that last 'else'.
14+
15+
test.ranges().forEach(r => {
16+
goTo.position(r.start);
17+
18+
test.ranges().forEach(range => {
19+
verify.occurrencesAtPositionContains(range, false);
20+
});
21+
});
22+
23+
goTo.marker();
24+
verify.occurrencesAtPositionCount(2);

0 commit comments

Comments
 (0)