github.com/zachgersh/packr@v1.11.1/builder/visitor_test.go (about) 1 package builder 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/require" 7 ) 8 9 func Test_Visitor(t *testing.T) { 10 r := require.New(t) 11 v := newVisitor("../example/example.go") 12 r.NoError(v.Run()) 13 14 r.Equal("example", v.Package) 15 r.Len(v.Errors, 0) 16 r.Len(v.Boxes, 7) 17 r.Equal([]string{"./assets", "./bar", "./constant", "./foo", "./sf", "./templates", "./variable"}, v.Boxes) 18 }