2019-09-03 18:29:28 +03:00
|
|
|
package stdos
|
2019-09-02 01:02:45 +03:00
|
|
|
|
|
|
|
import (
|
|
|
|
"path/filepath"
|
|
|
|
"testing"
|
|
|
|
|
2019-09-03 18:29:28 +03:00
|
|
|
"github.com/markbates/pkger/pkging/pkgtest"
|
2019-09-02 01:02:45 +03:00
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
2019-09-03 18:29:28 +03:00
|
|
|
func Test_Pkger(t *testing.T) {
|
2019-09-02 01:02:45 +03:00
|
|
|
r := require.New(t)
|
|
|
|
|
|
|
|
mypkging, err := New()
|
|
|
|
r.NoError(err)
|
|
|
|
|
2019-09-03 18:29:28 +03:00
|
|
|
mypkging.current.Dir = filepath.Join(mypkging.current.Dir, ".pkgtest")
|
2019-09-02 01:02:45 +03:00
|
|
|
mypkging.paths.Current = mypkging.current
|
|
|
|
|
2019-09-03 18:29:28 +03:00
|
|
|
suite, err := pkgtest.NewSuite(mypkging)
|
2019-09-02 01:02:45 +03:00
|
|
|
r.NoError(err)
|
|
|
|
|
|
|
|
suite.Test(t)
|
|
|
|
}
|