Skip to content

Commit 453e6d3

Browse files
authored
Tests: Split SerializedJSONTests (#8496)
Split the SerializedJSONTests into tests that pass and fail on Windows Related: #8433 rdar://148248105
1 parent 49e69c7 commit 453e6d3

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

Tests/BasicsTests/Serialization/SerializedJSONTests.swift

+13-9
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import _InternalTestSupport // for skipOnWindowsAsTestCurrentlyFails
1616

1717
final class SerializedJSONTests: XCTestCase {
1818
func testPathInterpolation() throws {
19-
try skipOnWindowsAsTestCurrentlyFails()
20-
2119
var path = try AbsolutePath(validating: #"/test\backslashes"#)
2220
var json: SerializedJSON = "\(path)"
2321

@@ -28,20 +26,26 @@ final class SerializedJSONTests: XCTestCase {
2826
#endif
2927

3028
#if os(Windows)
31-
path = try AbsolutePath(validating: #"\\?\C:\Users"#)
29+
path = try AbsolutePath(validating: #"\??\Volumes{b79de17a-a1ed-4c58-a353-731b7c4885a6}\\"#)
3230
json = "\(path)"
3331

32+
XCTAssertEqual(json.underlying, #"\\??\\Volumes{b79de17a-a1ed-4c58-a353-731b7c4885a6}"#)
33+
#endif
34+
}
35+
36+
func testPathInterpolationFailsOnWindows() throws {
37+
try skipOnWindowsAsTestCurrentlyFails(because: "Expectations are not met")
38+
39+
#if os(Windows)
40+
var path = try AbsolutePath(validating: #"\\?\C:\Users"#)
41+
var json: SerializedJSON = "\(path)"
42+
3443
XCTAssertEqual(json.underlying, #"C:\\Users"#)
3544

3645
path = try AbsolutePath(validating: #"\\.\UNC\server\share\"#)
3746
json = "\(path)"
3847

3948
XCTAssertEqual(json.underlying, #"\\.\\UNC\\server\\share"#)
40-
41-
path = try AbsolutePath(validating: #"\??\Volumes{b79de17a-a1ed-4c58-a353-731b7c4885a6}\\"#)
42-
json = "\(path)"
43-
44-
XCTAssertEqual(json.underlying, #"\\??\\Volumes{b79de17a-a1ed-4c58-a353-731b7c4885a6}"#)
45-
#endif
49+
#endif
4650
}
4751
}

0 commit comments

Comments
 (0)