diff --git a/gno.land/pkg/integration/doc.go b/gno.land/pkg/integration/doc.go index 34b872dbfda..4df759a8d66 100644 --- a/gno.land/pkg/integration/doc.go +++ b/gno.land/pkg/integration/doc.go @@ -21,7 +21,7 @@ // - Must be run before `gnoland start`. // - Creates a new user in the default keybase directory. // -// 4. `use`: +// 4. `loadpkg`: // - Must be run before `gnoland start`. // - Loads a specific package from the example folder or from the working ($WORK) directory. // - Can be used to load a single package or all packages within a directory. @@ -31,11 +31,12 @@ // and the second (optional) argument is the path to the package(s). // Examples: // -- # Load a package from the example packages directory: -// -- use gno.land/p/demo/ufmt +// -- loadpkg gno.land/p/demo/ufmt // -- # Load a package `./bar` from the current testscript's working directory with the name `gno.land/r/foobar/bar`: -// -- use gno.land/r/foobar/bar $WORK/bar -// - If the path is not prefixed with the working directory, it is assumed to be relative to the examples directory. -// - It's important to note that the load order is significant when using multiple use +// -- loadpkg gno.land/r/foobar/bar $WORK/bar +// - If the path is not prefixed with the working directory, it is assumed to be relative to the +// examples directory. +// - It's important to note that the load order is significant when using multiple `loadpkg` // command; packages should be loaded in the order they are dependent upon. // // Logging: diff --git a/gno.land/pkg/integration/testdata/use_example.txtar b/gno.land/pkg/integration/testdata/loadpkg_example.txtar similarity index 100% rename from gno.land/pkg/integration/testdata/use_example.txtar rename to gno.land/pkg/integration/testdata/loadpkg_example.txtar diff --git a/gno.land/pkg/integration/testdata/use_example_and_work.txtar b/gno.land/pkg/integration/testdata/loadpkg_example_and_work.txtar similarity index 92% rename from gno.land/pkg/integration/testdata/use_example_and_work.txtar rename to gno.land/pkg/integration/testdata/loadpkg_example_and_work.txtar index e38f6a295cd..15316c0ffd1 100644 --- a/gno.land/pkg/integration/testdata/use_example_and_work.txtar +++ b/gno.land/pkg/integration/testdata/loadpkg_example_and_work.txtar @@ -1,6 +1,6 @@ # load a package from the example packages directory. loadpkg gno.land/p/demo/ufmt -loadpkg gno.land/r/importtest $WORKDIR +loadpkg gno.land/r/importtest $WORK ## start a new node gnoland start diff --git a/gno.land/pkg/integration/testdata/use_work.txtar b/gno.land/pkg/integration/testdata/loadpkg_work.txtar similarity index 100% rename from gno.land/pkg/integration/testdata/use_work.txtar rename to gno.land/pkg/integration/testdata/loadpkg_work.txtar diff --git a/gno.land/pkg/integration/testing_integration.go b/gno.land/pkg/integration/testing_integration.go index f21ffefce75..37b7c696b52 100644 --- a/gno.land/pkg/integration/testing_integration.go +++ b/gno.land/pkg/integration/testing_integration.go @@ -312,11 +312,7 @@ func setupGnolandTestScript(t *testing.T, txtarDir string) testscript.Params { return } - if path == "." { - path = workDir - } else if strings.HasPrefix(path, "./") { - path = filepath.Join(workDir, path[2:]) - } else if !strings.HasPrefix(path, workDir) { + if !strings.HasPrefix(path, workDir) { path = filepath.Join(examplesDir, path) }