Skip to content

Commit

Permalink
fix: add standard test
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <[email protected]>
  • Loading branch information
gfanton committed Oct 7, 2023
1 parent 708092b commit 3ff3b43
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gnovm/cmd/gno/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ func TestLintApp(t *testing.T) {
}, {
args: []string{"lint", "--set_exit_status=0", "../../tests/integ/run-main/"},
stderrShouldContain: "./../../tests/integ/run-main: missing 'gno.mod' file (code=1).",
}, {
args: []string{"lint", "--set_exit_status=0", "../../tests/integ/package-not-declared/main.gno"},
stderrShouldContain: "main.gno:4: name fmt not declared (code=2).",
}, {
args: []string{"lint", "--set_exit_status=0", "../../tests/integ/minimalist-gnomod/"},
// TODO: raise an error because there is a gno.mod, but no .gno files
}, {
args: []string{"lint", "--set_exit_status=0", "../../tests/integ/invalid-module-name/"},
// TODO: raise an error because gno.mod is invalid
},

// TODO: 'gno mod' is valid?
// TODO: is gno source valid?
// TODO: are dependencies valid?
Expand Down
1 change: 1 addition & 0 deletions gnovm/tests/integ/package-not-declared/gno.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module gno.land/tests/nodeclared
5 changes: 5 additions & 0 deletions gnovm/tests/integ/package-not-declared/main.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package main

func Main() {
fmt.Println("hello world")
}

0 comments on commit 3ff3b43

Please sign in to comment.