add version flag and Gitea release targets

This commit is contained in:
Ein Anderssono
2026-06-11 20:32:08 +02:00
parent ca3a3e4a2a
commit 6002fda1f6
4 changed files with 53 additions and 9 deletions
+12
View File
@@ -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 {