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

Fix Swift Testing Capture Groups #373

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

cpisciotta
Copy link
Owner

No description provided.

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.91%. Comparing base (ac0ed6c) to head (453db5a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #373   +/-   ##
=======================================
  Coverage   90.91%   90.91%           
=======================================
  Files          17       17           
  Lines        2454     2454           
=======================================
  Hits         2231     2231           
  Misses        223      223           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cpisciotta cpisciotta force-pushed the charles/SwiftTestingTestPassedCaptureGroup branch from 3d59e39 to 443fefc Compare February 10, 2025 04:09
@cpisciotta cpisciotta changed the title Fix SwiftTestingTestPassedCaptureGroup Fix Swift Testing Capture Groups Feb 10, 2025
@cpisciotta cpisciotta force-pushed the charles/SwiftTestingTestPassedCaptureGroup branch from 443fefc to 9910af1 Compare February 10, 2025 20:48
@cpisciotta cpisciotta force-pushed the charles/SwiftTestingTestPassedCaptureGroup branch from 9910af1 to 453db5a Compare February 11, 2025 01:53
@@ -2010,7 +2010,7 @@ struct SwiftTestingRunStartedCaptureGroup: CaptureGroup {

/// Regular expression to capture the start of a test run.
/// $1 = message
static let regex = XCRegex(pattern: #"^.\s+(Test run started\.)$"#)
static let regex = XCRegex(pattern: #"^􀟈 (Test run started\.)$"#)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: There's a special character at the start of these regexes that GitHub doesn't render.

@@ -171,7 +171,7 @@ final class ParserTests: XCTestCase {
}

func testMatchSwiftTestingRunStarted() throws {
let input = "􀟈 Test run started."
let input = "􀟈 Test run started."
Copy link
Owner Author

@cpisciotta cpisciotta Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against example project using Swift Testing. Updated these since they need two spaces – as seen in swift_test_log.txt. These files don't render the leading symbol.

@cpisciotta cpisciotta merged commit 6179579 into main Feb 11, 2025
15 checks passed
@cpisciotta cpisciotta deleted the charles/SwiftTestingTestPassedCaptureGroup branch February 11, 2025 02:02
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

Successfully merging this pull request may close these issues.

1 participant