From 8af9c5cf1bb9fbb71be5fa4c4a9399600a05f068 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Thu, 13 Jun 2024 13:23:44 +0000 Subject: [PATCH] Fix test for Swift 5.10 --- Tests/CartonCommandTests/TestCommandTests.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tests/CartonCommandTests/TestCommandTests.swift b/Tests/CartonCommandTests/TestCommandTests.swift index 61d853a0..f254ac9d 100644 --- a/Tests/CartonCommandTests/TestCommandTests.swift +++ b/Tests/CartonCommandTests/TestCommandTests.swift @@ -43,8 +43,11 @@ final class TestCommandTests: XCTestCase { ["carton", "test", "--environment", "node"], packageDirectory: packageDirectory.asURL ) try result.checkNonZeroExit() - let output = try result.utf8stderrOutput() - XCTAssertTrue(output.contains("Test Suite 'All tests' passed")) + let stdout = try result.utf8Output() + let stderr = try result.utf8stderrOutput() + let expectedContent = "Test Suite 'All tests' passed" + // SwiftPM changed the output destination of SwiftPM Plugin in 6.0 + XCTAssertTrue(stdout.contains(expectedContent) || stderr.contains(expectedContent)) } }