Skip to content

Commit

Permalink
TestLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Feb 18, 2024
1 parent be59bbe commit 7f8a180
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modload/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import (
"runtime"
"testing"

"github.com/goplus/mod"
"github.com/goplus/mod/env"
"github.com/goplus/mod/modfile"
"github.com/qiniu/x/errors"
gomodfile "golang.org/x/mod/modfile"
"golang.org/x/mod/module"
)
Expand All @@ -51,6 +53,12 @@ func TestEmpty(t *testing.T) {
}
}

func TestLoad(t *testing.T) {
if _, e := Load("/path/not-found"); errors.Err(e) != mod.ErrNotFound {
t.Fatal("TestLoad:", e)
}
}

func TestCreate(t *testing.T) {
mod, err := Create("/foo/bar", "github.com/foo/bar", defaultGoVer, defaultGopVer)
if err != nil {
Expand Down

0 comments on commit 7f8a180

Please sign in to comment.