Skip to content

Commit b9ce377

Browse files
committed
[Windows] restore original working directory in TestFileManager.test_windowsPaths
Staying inside the directory breaks cleanup on tear down
1 parent 46b20d4 commit b9ce377

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tests/Foundation/Tests/TestFileManager.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,6 +1832,10 @@ VIDEOS=StopgapVideos
18321832
} catch {
18331833
XCTFail()
18341834
}
1835+
let originalWorkingDirectory = fm.currentDirectoryPath
1836+
defer {
1837+
fm.changeCurrentDirectoryPath(originalWorkingDirectory)
1838+
}
18351839
fm.changeCurrentDirectoryPath(tmpPath)
18361840
func checkPath(path: String) throws {
18371841
XCTAssertTrue(fm.createFile(atPath: path, contents: Data(), attributes: nil))

0 commit comments

Comments
 (0)