ThreadlessXunitTestRunner: Escape newlines in test result lines#817
Merged
radical merged 1 commit intodotnet:mainfrom Feb 7, 2022
Merged
ThreadlessXunitTestRunner: Escape newlines in test result lines#817radical merged 1 commit intodotnet:mainfrom
radical merged 1 commit intodotnet:mainfrom
Conversation
`ThreadlessXunitTestRunner` writes lines like:
`[PASS] foo.testname(testargs)`
to the console, which gets parsed by `WasmTestMessageProcessor`. But if
the list of arguments contains a new line(eg. in data for
`System.Text.RegularExpressions` tests), then the output line gets written
as multiple lines to the console. And that results in the output looking
like:
```
[02:41:04] info: abc, beginning: 0, length: 5, expectedSuccess: True, expectedValue: "a\nabc")
[02:41:04] info: abc, beginning: 0, length: 5, expectedSuccess: True, expectedValue: "a\nabc")
...
```
Each of those lines being the last part of the `[PASS] foo.testname(someargs, "\nabc, ..")`.
Instead, we escape the new line chars.
Partially fixes dotnet#816
pavelsavara
approved these changes
Feb 7, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ThreadlessXunitTestRunnerwrites lines like:to the console, which gets parsed by
WasmTestMessageProcessor. But ifthe list of arguments contains a new line(eg. in data for
System.Text.RegularExpressionstests), then the output line gets writtenas multiple lines to the console. And that results in the output looking
like:
Each of those lines being the last part of the
[PASS] foo.testname(someargs, "\nabc, ..").Instead, we escape the new line chars.
Partially fixes #816