Skip to content

Commit 002cae8

Browse files
committed
Delete TestXDG directory after TestNSHTTPCookieStorage
1 parent 6950bea commit 002cae8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

TestFoundation/TestNSHTTPCookieStorage.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ class TestNSHTTPCookieStorage: XCTestCase {
247247
task.launchPath = bundlePath.substring(to: pathIndex!) + "/xdgTestHelper/xdgTestHelper"
248248
#endif
249249
var environment = ProcessInfo.processInfo.environment
250-
environment["XDG_CONFIG_HOME"] = NSHomeDirectory() + "/TestXDG"
250+
let testPath = NSHomeDirectory() + "/TestXDG"
251+
environment["XDG_CONFIG_HOME"] = testPath
251252
task.environment = environment
252253
// Launch the task
253254
task.launch()
@@ -256,5 +257,6 @@ class TestNSHTTPCookieStorage: XCTestCase {
256257
XCTAssertEqual(status, 0)
257258
let terminationReason = task.terminationReason
258259
XCTAssertEqual(terminationReason, Process.TerminationReason.exit)
260+
try? fm.removeItem(atPath: testPath)
259261
}
260262
}

0 commit comments

Comments
 (0)