package main_test import ( "testing" "git.akyoto.dev/cli/q/cli" "git.akyoto.dev/go/assert" ) func TestCLI(t *testing.T) { type cliTest struct { arguments []string expectedExitCode int } tests := []cliTest{ {[]string{}, 1}, {[]string{"invalid"}, 1}, {[]string{"system"}, 0}, } for _, test := range tests { exitCode := cli.Main(test.arguments) t.Log(test.arguments) assert.Equal(t, exitCode, test.expectedExitCode) } }