Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Tests/SKSwiftPMWorkspaceTests/SwiftPMWorkspaceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ final class SwiftPMWorkspaceTests: XCTestCase {
let versionString = PackageModel.Platform.macOS.oldestSupportedVersion.versionString
check("-target", hostTriple.tripleString(forPlatformVersion: versionString), arguments: arguments)
check("-sdk", arguments: arguments)
check("-F", arguments: arguments)
check("-F", arguments: arguments, allowMultiple: true)
#else
check("-target", hostTriple.tripleString, arguments: arguments)
#endif
Expand Down Expand Up @@ -365,7 +365,7 @@ final class SwiftPMWorkspaceTests: XCTestCase {
check("-target",
hostTriple.tripleString(forPlatformVersion: versionString), arguments: arguments)
check("-isysroot", arguments: arguments)
check("-F", arguments: arguments)
check("-F", arguments: arguments, allowMultiple: true)
#else
check("-target", hostTriple.tripleString, arguments: arguments)
#endif
Expand Down Expand Up @@ -609,6 +609,7 @@ private func checkNot(
private func check(
_ pattern: String...,
arguments: [String],
allowMultiple: Bool = false,
file: StaticString = #filePath,
line: UInt = #line)
{
Expand All @@ -617,7 +618,7 @@ private func check(
return
}

if let index2 = arguments[(index+1)...].firstIndex(of: pattern) {
if !allowMultiple, let index2 = arguments[(index+1)...].firstIndex(of: pattern) {
XCTFail(
"pattern \(pattern) found twice (\(index), \(index2)) in \(arguments)",
file: file, line: line)
Expand Down