Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing multi-line messages from XCTFail can produce inaccurate results #425

Closed
adam-fowler opened this issue Jan 14, 2023 · 1 comment
Closed

Comments

@adam-fowler
Copy link

It is very hard to identify when an XCTFail message finishes in the output from XCTest.

The following test

func testXCTFail() {
    XCTFail("""
    Test
    Failed
    """)
    print("Hello")
}

produces the following output

Test Case 'AppTests.testXCTFail' started at 2023-01-14 12:38:26.859
/workspaces/Tests/AppTests/AppTests.swift:21: error: AppTests.testFail : failed - Test
Failed
Hello
Test Case 'AppTests.testFail' failed (0.006 seconds)

There is no way from this output to ascertain where the fail message ends.

This is an issue for the VSCode Swift extension when parsing XCTest output to update the TestExplorer

swift --version output

Swift version 5.8-dev (LLVM 170e2cfa496ad7c, Swift f32ae6f8c6068cd)
Target: aarch64-unknown-linux-gnu

This is an issue on all platforms

@grynspan
Copy link
Contributor

Duplicate of #361

@grynspan grynspan marked this as a duplicate of #361 Aug 20, 2023
@grynspan grynspan closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants