git.wit.org/jcarr/packr@v1.10.8/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, 5)
    17  	r.Equal([]string{"./assets", "./bar", "./foo", "./sf", "./templates"}, v.Boxes)
    18  }