prototmpl_test.go 318 B

1234567891011121314151617181920
  1. package generator
  2. import (
  3. "path/filepath"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestProtoTmpl(t *testing.T) {
  8. _ = Clean()
  9. // exists dir
  10. err := ProtoTmpl(t.TempDir())
  11. assert.Nil(t, err)
  12. // not exist dir
  13. dir := filepath.Join(t.TempDir(), "test")
  14. err = ProtoTmpl(dir)
  15. assert.Nil(t, err)
  16. }