Skip to content

Commit 89b49bb

Browse files
committed
Fix a test that was incorrect and failed
1 parent d91d9a0 commit 89b49bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/ProcessInvocationTests/ProcessInvocationTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,14 @@ final class ProcessInvocationTests : XCTestCase {
314314
let curPath = getenv("PATH").flatMap{ String(cString: $0) }
315315

316316
do {
317-
let envBefore = EnvAndCwd()
317+
let envBefore = EnvAndCwd().removing(keys: ["MANPATH"])
318318
let fd = try FileDescriptor.open("/dev/null", .readOnly)
319319
let output = try await ProcessInvocation(checkCwdAndEnvPath, usePATH: true, customPATH: [Self.scriptsPath], stdoutRedirect: .capture, stderrRedirect: .toNull, signalsToProcess: [], fileDescriptorsToSend: [fd: fd], lineSeparators: .none)
320320
.invokeAndGetRawOutput()
321321
let data = try XCTUnwrap(output.onlyElement)
322322
XCTAssert(data.eol.isEmpty)
323323
let envInside = try JSONDecoder().decode(EnvAndCwd.self, from: data.line).removing(keys: ["MANPATH"])
324-
let envAfter = EnvAndCwd()
324+
let envAfter = EnvAndCwd().removing(keys: ["MANPATH"])
325325
XCTAssertEqual(envBefore, envInside)
326326
XCTAssertEqual(envBefore, envAfter)
327327
#if false

0 commit comments

Comments
 (0)