Comments (3)
fixes for the first two cases...
--- a/examples/gno.land/r/demo/releases_example/releases1_filetest.gno
+++ b/examples/gno.land/r/demo/releases_example/releases1_filetest.gno
@@ -1,7 +1,7 @@
package main
import (
- "gno.land/r/demo/releases-example"
+ "gno.land/r/demo/releases_example"
)
func main() {
@@ -17,18 +17,18 @@ func main() {
// Output:
// -----------
-// # example-app
+// # example_app
//
-// ## [example-app v2 (latest)](r/demo/examples_example_v2)
+// ## [example_app v2 (latest)](r/demo/examples_example_v2)
//
// various improvements
//
-// ## [example-app v1](r/demo/examples_example_v1)
+// ## [example_app v1](r/demo/examples_example_v1)
//
// initial release
//
// -----------
-// ## [example-app v1](r/demo/examples_example_v1)
+// ## [example_app v1](r/demo/examples_example_v1)
//
// initial release
//
diff --git a/gnovm/tests/imports.go b/gnovm/tests/imports.go
index 63ccd088..7999160d 100644
--- a/gnovm/tests/imports.go
+++ b/gnovm/tests/imports.go
@@ -457,12 +457,19 @@ func testPackageInjector(store gno.Store, pn *gno.PackageNode) {
// Also inject stdlibs native functions.
stdlibs.InjectPackage(store, pn)
isOriginCall := func(m *gno.Machine) bool {
- switch m.Frames[0].Func.Name {
+ tname := m.Frames[0].Func.Name
+ switch tname {
case "main": // test is a _filetest
return len(m.Frames) == 3
case "runtest": // test is a _test
return len(m.Frames) == 7
}
+ // support init() in _filetest
+ // XXX do we need to distinguish from 'runtest'/_test?
+ // XXX pretty hacky even if not.
+ if strings.HasPrefix(string(tname), "init.") {
+ return len(m.Frames) == 3
+ }
panic("unable to determine if test is a _test or a _filetest")
}
// Test specific injections:
from gno.
should be the case, we'll fix it.
from gno.
I'm on the CI thing on my side.
Edit: #784
from gno.
Related Issues (20)
- unknown import path `encoding/binary` when adding package HOT 2
- How is `MaxCycles` set for gno.land? HOT 2
- gnomod: Infinite loop when a requested package does not exist.
- tests should not rely on network connections HOT 1
- default configuration file
- gno IDE HOT 1
- Support generating `multi msg` transaction with gnokey HOT 4
- Move _filetest.gno to filetests/* folder. HOT 8
- Move tm2/pkgs/sdk/vm to gno.land/pkgs/sdk/vm HOT 1
- gno-specific code linters
- rfc: change the `time` stdlib package
- [RFC] Handling nested packages HOT 1
- `r/demo/foo20` really doesn't check Error HOT 1
- Block data synchronization and full node operation on test3 HOT 5
- Update board install instructions HOT 1
- feat: extend `Render(path)` to support additional response types? HOT 1
- META - WorxDAO (Contributors DAO) HOT 1
- GnoSDK HOT 2
- Calling injected function in same package files (returns undefined error) HOT 2
- Send via username (gnot, grc20) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gno.