Skip to content

Commit 0a7e8e1

Browse files
authored
Merge pull request #100 from compnerd/utf16
Tests: explicitly convert to UTF16 on Windows
2 parents a102156 + f9a5148 commit 0a7e8e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tests/SystemTests/FilePathTests/FilePathTest.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ final class FilePathTest: XCTestCase {
6969
}
7070

7171
testPath.filePath.withPlatformString {
72+
#if os(Windows)
73+
XCTAssertEqual(testPath.string, String(decodingCString: $0, as: UTF16.self))
74+
#else
7275
XCTAssertEqual(testPath.string, String(cString: $0))
76+
#endif
7377
XCTAssertEqual(testPath.filePath, FilePath(platformString: $0))
7478
}
7579
}

0 commit comments

Comments
 (0)