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