Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip missing configuration file tests on Windows for Swift < 6.0.2 #857

Merged
merged 1 commit into from
Oct 18, 2024
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
16 changes: 13 additions & 3 deletions Tests/SwiftFormatTests/API/ConfigurationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,23 @@ final class ConfigurationTests: XCTestCase {
XCTAssertEqual(defaultInitConfig, emptyJSONConfig)
}

func testMissingConfigurationFile() {
func testMissingConfigurationFile() throws {
#if os(Windows)
#if compiler(<6.0.2)
try XCTSkipIf(true, "Requires https://github.com/swiftlang/swift-foundation/pull/983")
#endif
let path = #"C:\test.swift"#
#else
let path = "/test.swift"
#endif
XCTAssertNil(Configuration.url(forConfigurationFileApplyingTo: URL(fileURLWithPath: path)))
}

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

func testMissingConfigurationFileMountedDirectory() throws {
#if !os(Windows)
#if os(Windows)
#if compiler(<6.0.2)
try XCTSkipIf(true, "Requires https://github.com/swiftlang/swift-foundation/pull/983")
#endif
#else
try XCTSkipIf(true, #"\\ file mounts are only a concept on Windows"#)
#endif
let path = #"\\mount\test.swift"#
Expand Down