Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov committed Nov 4, 2023
1 parent e7dc836 commit 3417c3d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gnovm/cmd/gno/bug.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
14 changes: 12 additions & 2 deletions gnovm/cmd/gno/bug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 3417c3d

Please sign in to comment.