Skip to content

Commit

Permalink
fix: split test failures around ' : ' to not mask XCTfail messages
Browse files Browse the repository at this point in the history
Problem ocurred when a colon was present in the actual fail output (e.g. in type qualification)
  • Loading branch information
GNMoseke committed Jul 11, 2024
1 parent f004b0d commit 53e39ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/TestRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ class PeregrineRunner: TestRunner {

var location = String(errorLocation.trimmingCharacters(in: [":", " "]))
location.removeFirst(packagePathPrefix.count)
let failureComponents = testAndFail.split(separator: ":")
// The spaces are important here and this is quite beholden to spm output formatting, just be aware
let failureComponents = testAndFail.split(separator: " : ")
guard
let testName = failureComponents.first?.trimmingCharacters(in: .whitespaces),
let failure = failureComponents.last
Expand Down

0 comments on commit 53e39ee

Please sign in to comment.