forked from mirror/pkger
26 lines
429 B
Go
26 lines
429 B
Go
package costello
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/markbates/pkger/pkging"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func StatTest(t *testing.T, ref *Ref, pkg pkging.Pkger) {
|
|
r := require.New(t)
|
|
|
|
_, err := LoadFile("/go.mod", ref, pkg)
|
|
r.NoError(err)
|
|
|
|
osi, err := os.Stat(filepath.Join(ref.Dir, "go.mod"))
|
|
r.NoError(err)
|
|
|
|
psi, err := pkg.Stat("/go.mod")
|
|
r.NoError(err)
|
|
|
|
CmpFileInfo(t, osi, psi)
|
|
}
|