Don't normalize whitespace in fourslash tests #18447
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #18349
The problem was that the test runner had code to normalize newlines, but it didn't change the index; so it thought that the new cursor was 1 character further along than it really was.
Changed fourslash tests to no longer normalize newlines; discovered a few bugs along the way (#18445) where CRLF characters are inserted into LF documents. (Fourslash tests are parsed with LF newlines even if the test file itself uses CRLF.)
Also had to fix an error related to #18291 where formatting options were being ignored due to an unused parameter.
Since this is just a test fix I don't think it needs a TS2.5 port.