aerospace fork
Something went wrong. Try again.
606 B · 20 lines
Swift
at main
123456789101112131415161718192021@testable import AppBundleimport Commonimport XCTest
@MainActorfinal class TrueCommandTest: XCTestCase { override func setUp() async throws { setUpWorkspacesForTests() }
func testParse() { testParseSingleCommandSucc("true", TrueCmdArgs(rawArgs: [])) testParseCommandFail("true foo", msg: "ERROR: Unknown argument \'foo\'", exitCode: 2)
testParseCommandHelp("true -h") testParseCommandHelp("true --help") }
func testExitCode() async { assertEquals(await parseCommand("true").cmdOrDie.run(.defaultEnv, .emptyStdin).exitCode.rawValue, 0) }}