Skip to content

Commit 07c2906

Browse files
MaxDesiatovmattt
andauthored
Apply suggestions from code review
Co-authored-by: Mattt <[email protected]>
1 parent d0df58a commit 07c2906

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Tests/EndToEndTests/EndToEndTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ import XCTest
44
final class EndToEndTests: XCTestCase {
55
func testCSS() throws {
66
// Some of the APIs that we use below are available in macOS 10.13 and above.
7-
guard #available(macOS 10.13, *) else {
8-
return
9-
}
10-
117
let process = Process()
128
process.executableURL = productsDirectory.appendingPathComponent("swift-doc")
139
process.arguments = ["generate", "--module-name", "SwiftDoc", "--format", "html", "Sources"]
1410

1511
let pipe = Pipe()
1612
process.standardOutput = pipe
1713

18-
try process.run()
14+
if #available(OSX 10.13, *) {
15+
try process.run()
16+
} else {
17+
process.launch()
18+
}
1919
process.waitUntilExit()
2020

2121
let data = pipe.fileHandleForReading.readDataToEndOfFile()
@@ -33,7 +33,7 @@ final class EndToEndTests: XCTestCase {
3333
return XCTFail("Failed to decode a UTF-8 string from `cssData` in \(#function)")
3434
}
3535

36-
XCTAssertTrue(css.starts(with: ":root"))
36+
XCTAssertTrue(css.contains(":root"))
3737
}
3838

3939
/// Returns path to the built products directory.

0 commit comments

Comments
 (0)