github.com/joey-fossa/fossa-cli@v0.7.34-0.20190708193710-569f1e8679f0/analyzers/golang/discover_test.go (about) 1 package golang_test 2 3 import ( 4 "path/filepath" 5 "testing" 6 7 "github.com/stretchr/testify/assert" 8 9 "github.com/fossas/fossa-cli/analyzers/golang" 10 ) 11 12 func TestDiscoverUsesRelativePaths(t *testing.T) { 13 modules, err := golang.Discover(filepath.Join("..", ".."), nil) 14 assert.NoError(t, err) 15 16 for _, m := range modules { 17 assert.True(t, !filepath.IsAbs(m.Dir), "%#v is an absolute directory", m.Dir) 18 } 19 }