Skip to content

Commit 39c982f

Browse files
authored
Merge pull request #2909 from readdle/temporary-round-trip
[Windows] Restore original working directory in TestFileManager.test_windowsPaths
2 parents 7ff51ef + b9ce377 commit 39c982f

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
@@ -1837,6 +1837,10 @@ VIDEOS=StopgapVideos
18371837
} catch {
18381838
XCTFail()
18391839
}
1840+
let originalWorkingDirectory = fm.currentDirectoryPath
1841+
defer {
1842+
fm.changeCurrentDirectoryPath(originalWorkingDirectory)
1843+
}
18401844
fm.changeCurrentDirectoryPath(tmpPath)
18411845
func checkPath(path: String) throws {
18421846
XCTAssertTrue(fm.createFile(atPath: path, contents: Data(), attributes: nil))

0 commit comments

Comments
 (0)