Skip to content

Commit 503f2a9

Browse files
committed
Add'l testing
1 parent 31e6061 commit 503f2a9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Tests/ArgumentParserExampleTests/CountLinesExampleTests.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,26 @@ final class CountLinesExampleTests: XCTestCase {
3737
"""
3838
try AssertExecuteCommand(command: "count-lines -h", expected: helpText)
3939
}
40+
41+
@available(macOS 12, *)
42+
func testPrintEnv() throws {
43+
let process = Process()
44+
process.launchPath = "/usr/bin/env"
45+
46+
let output = Pipe()
47+
process.standardOutput = output
48+
49+
try! process.run()
50+
process.waitUntilExit()
51+
52+
let outputActual = String(
53+
data: output.fileHandleForReading.readDataToEndOfFile(),
54+
encoding: .utf8)!
55+
print("ENV:")
56+
print(outputActual)
57+
58+
XCTFail()
59+
}
4060
}
4161

4262
#endif

0 commit comments

Comments
 (0)