pkger/fs/memfs/memfs_test.go

28 lines
407 B
Go
Raw Normal View History

2019-09-01 00:00:24 +03:00
package memfs
import (
2019-09-01 05:45:22 +03:00
"testing"
2019-09-01 00:00:24 +03:00
"github.com/markbates/pkger/fs/fstest"
"github.com/markbates/pkger/here"
2019-09-01 05:45:22 +03:00
"github.com/stretchr/testify/require"
2019-09-01 00:00:24 +03:00
)
2019-09-01 05:45:22 +03:00
func Test_FS(t *testing.T) {
r := require.New(t)
info, err := here.Current()
r.NoError(err)
2019-09-01 06:29:25 +03:00
r.NotZero(info)
2019-09-01 05:45:22 +03:00
myfs, err := New(info)
r.NoError(err)
2019-09-01 06:29:25 +03:00
WithInfo(myfs, info)
2019-09-01 05:45:22 +03:00
suite, err := fstest.NewFileSystem(myfs)
r.NoError(err)
2019-09-01 00:00:24 +03:00
2019-09-01 05:45:22 +03:00
suite.Test(t)
2019-09-01 00:00:24 +03:00
}