Skip to content

Commit 29197fe

Browse files
authored
Merge pull request #857 from ahoppen/skip-tests
Skip missing configuration file tests on Windows for Swift < 6.0.2
2 parents 06ca47b + 8581f2c commit 29197fe

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Tests/SwiftFormatTests/API/ConfigurationTests.swift

+13-3
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,23 @@ final class ConfigurationTests: XCTestCase {
1818
XCTAssertEqual(defaultInitConfig, emptyJSONConfig)
1919
}
2020

21-
func testMissingConfigurationFile() {
21+
func testMissingConfigurationFile() throws {
2222
#if os(Windows)
23+
#if compiler(<6.0.2)
24+
try XCTSkipIf(true, "Requires https://github.com/swiftlang/swift-foundation/pull/983")
25+
#endif
2326
let path = #"C:\test.swift"#
2427
#else
2528
let path = "/test.swift"
2629
#endif
2730
XCTAssertNil(Configuration.url(forConfigurationFileApplyingTo: URL(fileURLWithPath: path)))
2831
}
2932

30-
func testMissingConfigurationFileInSubdirectory() {
33+
func testMissingConfigurationFileInSubdirectory() throws {
3134
#if os(Windows)
35+
#if compiler(<6.0.2)
36+
try XCTSkipIf(true, "Requires https://github.com/swiftlang/swift-foundation/pull/983")
37+
#endif
3238
let path = #"C:\whatever\test.swift"#
3339
#else
3440
let path = "/whatever/test.swift"
@@ -37,7 +43,11 @@ final class ConfigurationTests: XCTestCase {
3743
}
3844

3945
func testMissingConfigurationFileMountedDirectory() throws {
40-
#if !os(Windows)
46+
#if os(Windows)
47+
#if compiler(<6.0.2)
48+
try XCTSkipIf(true, "Requires https://github.com/swiftlang/swift-foundation/pull/983")
49+
#endif
50+
#else
4151
try XCTSkipIf(true, #"\\ file mounts are only a concept on Windows"#)
4252
#endif
4353
let path = #"\\mount\test.swift"#

0 commit comments

Comments
 (0)