mirror of
https://github.com/beego/bee.git
synced 2024-11-21 23:50:54 +00:00
fixed tests code cannot convert ".." to type rune
修正在使用bee生成的测试用例代码时,文件路径没有转换为字符串导致报错的问题
This commit is contained in:
parent
ff63f454a7
commit
777bf3e1ad
@ -478,7 +478,7 @@ import (
|
||||
|
||||
func init() {
|
||||
_, file, _, _ := runtime.Caller(1)
|
||||
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + filepath.Separator)))
|
||||
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + string(filepath.Separator))))
|
||||
beego.TestBeegoInit(apppath)
|
||||
}
|
||||
|
||||
|
2
new.go
2
new.go
@ -186,7 +186,7 @@ import (
|
||||
|
||||
func init() {
|
||||
_, file, _, _ := runtime.Caller(1)
|
||||
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + filepath.Separator)))
|
||||
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + string(filepath.Separator))))
|
||||
beego.TestBeegoInit(apppath)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user