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
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