未验证 提交 873f613a 编写于 作者: P Phodal Huang

fix: try to fix os stat error issue for ci

上级 6a3b78ed
......@@ -143,7 +143,7 @@ func copyClass(originFile string, newFile string) {
_, err := CopyFile(originFile, newFile)
if err != nil {
panic(err)
log.Println(err)
}
}
......
package move_class
import (
"fmt"
. "github.com/onsi/gomega"
"os"
"os/exec"
"path/filepath"
"testing"
)
......@@ -12,10 +14,16 @@ func TestMoveClassApp(t *testing.T) {
config := "../../../../_fixtures/refactor/move.config"
path := "../../../../_fixtures/refactor/"
abs_path, _ := filepath.Abs(path)
app := NewMoveClassApp(config, abs_path + "/")
absPath, _ := filepath.Abs(path)
app := NewMoveClassApp(config, absPath+ "/")
app.Analysis()
stat, _ := os.Stat(path + "/move/b/ImportForB.java")
// debug
cmd := exec.Command("tree", absPath)
output, _ := cmd.CombinedOutput()
fmt.Println(string(output))
stat, _ := os.Stat(absPath + "/move/b/ImportForB.java")
g.Expect(stat.Name()).To(Equal("ImportForB.java"))
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册