pkger/pkging/stdos/stdos_test.go

38 lines
562 B
Go
Raw Normal View History

2019-09-03 18:29:28 +03:00
package stdos
2019-09-02 01:02:45 +03:00
import (
2019-09-12 04:29:39 +03:00
"io/ioutil"
2019-09-02 01:02:45 +03:00
"testing"
2019-09-12 04:29:39 +03:00
"github.com/markbates/pkger/pkging"
2019-09-03 18:29:28 +03:00
"github.com/markbates/pkger/pkging/pkgtest"
2019-09-02 01:02:45 +03:00
)
2019-09-03 18:29:28 +03:00
func Test_Pkger(t *testing.T) {
2019-09-12 04:29:39 +03:00
suite, err := pkgtest.NewSuite("stdos", func() (pkging.Pkger, error) {
2019-10-18 19:01:48 +03:00
info, err := pkgtest.App()
2019-09-12 04:29:39 +03:00
if err != nil {
return nil, err
}
2019-10-18 19:01:48 +03:00
2019-09-12 04:29:39 +03:00
dir, err := ioutil.TempDir("", "stdos")
if err != nil {
return nil, err
}
2019-09-02 01:02:45 +03:00
2019-10-18 19:01:48 +03:00
info.Dir = dir
2019-10-09 20:21:54 +03:00
2019-10-18 19:01:48 +03:00
mypkging, err := New(info)
2019-10-09 20:21:54 +03:00
if err != nil {
return nil, err
}
2019-09-02 01:02:45 +03:00
2019-09-12 04:29:39 +03:00
return mypkging, nil
})
if err != nil {
t.Fatal(err)
}
2019-09-02 01:02:45 +03:00
suite.Test(t)
}