We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f92e72 commit 5809e86Copy full SHA for 5809e86
goenv/goenv_test.go
@@ -0,0 +1,28 @@
1
+package goenv
2
+
3
+import (
4
+ "path/filepath"
5
+ "testing"
6
7
+ "github.com/stretchr/testify/assert"
8
+ "github.com/stretchr/testify/require"
9
+)
10
11
+func TestGetOne(t *testing.T) {
12
+ p, err := GetOne(GOMOD)
13
+ require.NoError(t, err)
14
15
+ abs, err := filepath.Abs("..")
16
17
18
+ assert.Equal(t, filepath.Join(abs, "go.mod"), p)
19
+}
20
21
+func TestGet(t *testing.T) {
22
+ values, err := Get(GOMOD, GO111MODULE)
23
24
25
+ assert.NotEmpty(t, values[GOMOD])
26
+ assert.NotEmpty(t, values[GO111MODULE])
27
+ assert.Empty(t, values[GOEXE])
28
0 commit comments