Skip to content

Commit

Permalink
Add'l testing
Browse files Browse the repository at this point in the history
  • Loading branch information
natecook1000 committed Mar 2, 2022
1 parent 31e6061 commit 503f2a9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Tests/ArgumentParserExampleTests/CountLinesExampleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,26 @@ final class CountLinesExampleTests: XCTestCase {
"""
try AssertExecuteCommand(command: "count-lines -h", expected: helpText)
}

@available(macOS 12, *)
func testPrintEnv() throws {
let process = Process()
process.launchPath = "/usr/bin/env"

let output = Pipe()
process.standardOutput = output

try! process.run()
process.waitUntilExit()

let outputActual = String(
data: output.fileHandleForReading.readDataToEndOfFile(),
encoding: .utf8)!
print("ENV:")
print(outputActual)

XCTFail()
}
}

#endif

0 comments on commit 503f2a9

Please sign in to comment.