mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 09:40:24 +08:00
23 lines
381 B
Go
23 lines
381 B
Go
package generator
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/tal-tech/go-zero/tools/goctl/util"
|
|
)
|
|
|
|
func TestProtoTmpl(t *testing.T) {
|
|
_ = Clean()
|
|
// exists dir
|
|
err := ProtoTmpl(util.MustTempDir())
|
|
assert.Nil(t, err)
|
|
|
|
// not exist dir
|
|
dir := filepath.Join(util.MustTempDir(), "test")
|
|
err = ProtoTmpl(dir)
|
|
assert.Nil(t, err)
|
|
}
|