add version flag and Gitea release targets
This commit is contained in:
@@ -106,6 +106,18 @@ func TestRunHelp(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRunVersion(t *testing.T) {
|
||||
for _, cmd := range []string{"version", "--version", "-v"} {
|
||||
out, _, rc := runWith([]string{cmd}, &mockBridge{})
|
||||
if rc != 0 {
|
||||
t.Errorf("%s: rc = %d, want 0", cmd, rc)
|
||||
}
|
||||
if out == "" {
|
||||
t.Errorf("%s: output is empty", cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestRunUnknownCommand(t *testing.T) {
|
||||
_, stderr, rc := runWith([]string{"foo"}, &mockBridge{})
|
||||
if rc != 1 {
|
||||
|
||||
Reference in New Issue
Block a user