fix: default output debugtalk_gen.py by building debugtalk.py

This commit is contained in:
xucong053
2022-05-26 21:57:35 +08:00
parent c08861c9ca
commit c2bcbfd07f
3 changed files with 13 additions and 8 deletions

View File

@@ -261,9 +261,9 @@ func buildPy(path string, output string) error {
// generate debugtalk.py
if output == "" {
dir, _ := os.Getwd()
output = filepath.Join(dir, "debugtalk.py")
output = filepath.Join(dir, "debugtalk_gen.py")
} else if builtin.IsFolderPathExists(output) {
output = filepath.Join(output, "debugtalk.py")
output = filepath.Join(output, "debugtalk_gen.py")
}
err = templateContent.genDebugTalk(output, pyTemplate)
if err != nil {

View File

@@ -17,7 +17,7 @@ func TestRun(t *testing.T) {
t.Fatal()
}
err = Run("examples/debugtalk_no_funppy.py", "./debugtalk_gen.py")
err = Run("examples/debugtalk_no_funppy.py", "./debugtalk.py")
if !assert.Nil(t, err) {
t.Fatal()
}