Skip to content

Commit

Permalink
chore: fixup and lint
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <[email protected]>
  • Loading branch information
gfanton committed Feb 23, 2024
1 parent 665bea2 commit bca5a19
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
11 changes: 6 additions & 5 deletions gno.land/pkg/integration/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 1 addition & 5 deletions gno.land/pkg/integration/testing_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,7 @@ func setupGnolandTestScript(t *testing.T, txtarDir string) testscript.Params {
return

Check warning on line 312 in gno.land/pkg/integration/testing_integration.go

View check run for this annotation

Codecov / codecov/patch

gno.land/pkg/integration/testing_integration.go#L312

Added line #L312 was not covered by tests
}

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)
}

Expand Down

0 comments on commit bca5a19

Please sign in to comment.