forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add all kinds of errors described in gnolang#1636.
- Loading branch information
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
...gno_precompile/03_invalid_gno_files.txtar → ...precompile/03_gno_files_parse_error.txtar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
gnovm/cmd/gno/testdata/gno_precompile/08_build_flag_with_parse_error.txtar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Run gno precompile with -gobuild flag on file with parse error | ||
|
||
! gno precompile -gobuild . | ||
|
||
! stdout .+ | ||
stderr 'main.gno: precompile: parse: main.gno:3:1: expected declaration, found invalid' | ||
|
||
# no *.gen.go files are created | ||
! exec test -f main.gno.gen.go | ||
|
||
-- main.gno -- | ||
package main | ||
|
||
invalid |
26 changes: 26 additions & 0 deletions
26
gnovm/cmd/gno/testdata/gno_precompile/09_gno_files_whitelist_error.txtar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Run gno precompile with gno files with whitelist errors | ||
|
||
! gno precompile . | ||
|
||
! stdout .+ | ||
stderr 'main.gno: precompile: import "xxx" is not in the whitelist' | ||
stderr 'sub/sub.gno: precompile: import "xxx" is not in the whitelist' | ||
|
||
# no *.gen.go files are created | ||
! exec test -f main.gno.gen.go | ||
! exec test -f sub/sub.gno.gen.go | ||
|
||
-- main.gno -- | ||
package main | ||
|
||
import ( | ||
"std" | ||
"xxx" | ||
) | ||
|
||
func main() {} | ||
|
||
-- sub/sub.gno -- | ||
package sub | ||
|
||
import "xxx" |