mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 09:40:24 +08:00
22 lines
352 B
Go
22 lines
352 B
Go
|
package generator
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"path/filepath"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestProtoTmpl(t *testing.T) {
|
||
|
out, err := filepath.Abs("./test/test.proto")
|
||
|
assert.Nil(t, err)
|
||
|
defer func() {
|
||
|
_ = os.RemoveAll(filepath.Dir(out))
|
||
|
}()
|
||
|
err = ProtoTmpl(out)
|
||
|
assert.Nil(t, err)
|
||
|
_, err = os.Stat(out)
|
||
|
assert.Nil(t, err)
|
||
|
}
|