1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-14 06:40:06 +02:00

🏗 WIP: Even better Shell functionality

This commit is contained in:
2022-09-28 21:43:18 +02:00
parent bbac2632a2
commit 99da328921
5 changed files with 31 additions and 23 deletions

View File

@@ -31,14 +31,18 @@ class FakeShellTest: XCTestCase {
XCTAssertTrue(Shell is TestableShell)
XCTAssertEqual(expectedPhpOutput, Shell.sync("php -v").output)
XCTAssertEqual(expectedPhpOutput, Shell.sync("php -v").out)
XCTAssertEqual(expectedPhpOutput, Shell.sync("php --version").output)
XCTAssertEqual(expectedPhpOutput, Shell.sync("php --version").out)
}
func test_unrecognized_commands_output_stderr() {
ActiveShell.useTestable([:])
XCTAssertEqual("Unexpected Command", Shell.sync("unrecognized command").output)
let output = Shell.sync("unrecognized command")
XCTAssertTrue(output.hasError)
XCTAssertEqual("Unexpected Command", output.err)
XCTAssertEqual("", output.out)
}
}