diff --git a/gnovm/cmd/gno/bug.go b/gnovm/cmd/gno/bug.go index 937deaa3ae6..99a6d20fd1a 100644 --- a/gnovm/cmd/gno/bug.go +++ b/gnovm/cmd/gno/bug.go @@ -43,7 +43,8 @@ func execBug(args []string, io *commands.IO) error { url := "https://github.com/gnolang/gno/issues/new?body=" + url.QueryEscape(body) if !openBrowser(url) { - io.Println("Please file a new issue at github.com/gnolang/gno/issues/new using this template:\n") + io.Println("Please file a new issue at github.com/gnolang/gno/issues/new using this template:") + io.Println() io.Println(body) } diff --git a/gnovm/cmd/gno/bug_test.go b/gnovm/cmd/gno/bug_test.go index 3e7df71c23f..76546fed758 100644 --- a/gnovm/cmd/gno/bug_test.go +++ b/gnovm/cmd/gno/bug_test.go @@ -2,6 +2,16 @@ package main import "testing" -func TestBug(t *testing.T) { - +func TestBugApp(t *testing.T) { + tc := []testMainCase{ + { + args: []string{"bug -h"}, + errShouldBe: "flag: help requested", + }, + { + args: []string{"bug unknown"}, + errShouldBe: "flag: help requested", + }, + } + testMainCaseRun(t, tc) }