mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
cmd/entc: support custom target on codegen (#189)
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/189 Fixes #61 Reviewed By: alexsn Differential Revision: D18676988 fbshipit-source-id: 00d415e14d1278a45edea49c69abe4916303f55d
This commit is contained in:
committed by
Facebook Github Bot
parent
67c3fd2db9
commit
0344904a4e
@@ -35,6 +35,11 @@ func testPkgPath(t *testing.T, x packagestest.Exporter) {
|
||||
|
||||
target = filepath.Join(e.Config.Dir, "z/ent")
|
||||
pkgPath, err = PkgPath(e.Config, target)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "golang.org/x/y/z/ent", pkgPath)
|
||||
|
||||
target = filepath.Join(e.Config.Dir, "z/e/n/t")
|
||||
pkgPath, err = PkgPath(e.Config, target)
|
||||
require.Error(t, err)
|
||||
require.Empty(t, pkgPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user