You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/tools/goctl/rpc/generator/prototmpl_test.go

21 lines
318 B
Go

package generator
import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func TestProtoTmpl(t *testing.T) {
_ = Clean()
// exists dir
err := ProtoTmpl(t.TempDir())
assert.Nil(t, err)
// not exist dir
dir := filepath.Join(t.TempDir(), "test")
err = ProtoTmpl(dir)
assert.Nil(t, err)
}