microsoft / microsoft/vscode-java-test
Test output broken when strings contain newlines
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 340
- Forks
- 173
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 18
Description
It looks like something is wrong with the parsing of test failures when strings contain newlines.
If I do:
assertEquals("if (x < 3){\n", "if (x < 3) {\n");
I get strange brackets in the output, and the plugin doesn't display the diff view that I normally get:
org.opentest4j.AssertionFailedError: expected: [if (x [ 3){
] but was: [if (x [ 3) {
]
At the command line, this works. I get:
expected:<if (x < 3)[]{
> but was:<if (x < 3)[ ]{
>
This is on MacOS 13.6, v0.40.0 of the runner, and vscode 1.83.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the assertEquals case with newline-containing strings using the runner and VS Code versions described, then compare the plugin output with the command-line output. Trace how the runner parses the failure text; done means the malformed brackets are gone and the normal diff view appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- developer-experience, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100