Added test case for broken if-elses.
This commit is contained in:
parent
0632d0c38c
commit
0a5c12c7ab
1 changed files with 24 additions and 0 deletions
24
tests/cases/fourslash/getOccurrencesIfElseBroken.ts
Normal file
24
tests/cases/fourslash/getOccurrencesIfElseBroken.ts
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/// <reference path='fourslash.ts' />
|
||||||
|
|
||||||
|
|
||||||
|
////[|if|] (true) {
|
||||||
|
//// var x = 1;
|
||||||
|
////}
|
||||||
|
////[|else if|] ()
|
||||||
|
////[|else if|]
|
||||||
|
////[|else|] /* whar garbl */ [|if|] (i/**/f (true) { } else { })
|
||||||
|
////else
|
||||||
|
|
||||||
|
// It would be nice if in the future,
|
||||||
|
// We could include that last 'else'.
|
||||||
|
|
||||||
|
test.ranges().forEach(r => {
|
||||||
|
goTo.position(r.start);
|
||||||
|
|
||||||
|
test.ranges().forEach(range => {
|
||||||
|
verify.occurrencesAtPositionContains(range, false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
goTo.marker();
|
||||||
|
verify.occurrencesAtPositionCount(2);
|
Loading…
Reference in a new issue