94 lines
1.8 KiB
Go
94 lines
1.8 KiB
Go
package parser
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestGenerateBasePrjYmlFromRealEvo(t *testing.T) {
|
|
u := new(UploadSetting)
|
|
|
|
u.GenerateFromRealEvo(basePrjPath, "")
|
|
|
|
realPathPairMap := make(map[string]string)
|
|
|
|
for _, UploadFile := range u.UploadPair {
|
|
absLocalFilePath, err := u.GetAbsLocalPath(UploadFile.LocalPath, "")
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
realPathPairMap[absLocalFilePath] = UploadFile.RemotePath
|
|
}
|
|
|
|
u.ClearTOML()
|
|
u.SaveTOML()
|
|
|
|
u.ClearYaml()
|
|
u.SaveYaml()
|
|
}
|
|
|
|
func TestGenerateBspPrjYmlFromRealEvo(t *testing.T) {
|
|
u := new(UploadSetting)
|
|
|
|
u.GenerateFromRealEvo(bspPrjPath, "")
|
|
|
|
realPathPairMap := make(map[string]string)
|
|
|
|
for _, UploadFile := range u.UploadPair {
|
|
absLocalFilePath, err := u.GetAbsLocalPath(UploadFile.LocalPath, "")
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
realPathPairMap[absLocalFilePath] = UploadFile.RemotePath
|
|
}
|
|
|
|
u.ClearTOML()
|
|
u.SaveTOML()
|
|
|
|
u.ClearYaml()
|
|
u.SaveYaml()
|
|
}
|
|
|
|
func TestGenerateLibPrjYmlFromRealEvo(t *testing.T) {
|
|
u := new(UploadSetting)
|
|
|
|
u.GenerateFromRealEvo(linuxCptPrjPath, "")
|
|
|
|
realPathPairMap := make(map[string]string)
|
|
|
|
for _, UploadFile := range u.UploadPair {
|
|
absLocalFilePath, err := u.GetAbsLocalPath(UploadFile.LocalPath, "")
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
realPathPairMap[absLocalFilePath] = UploadFile.RemotePath
|
|
}
|
|
|
|
u.ClearTOML()
|
|
u.SaveTOML()
|
|
|
|
u.ClearYaml()
|
|
u.SaveYaml()
|
|
}
|
|
|
|
func TestGenerateAppPrjYmlFromRealEvo(t *testing.T) {
|
|
u := new(UploadSetting)
|
|
|
|
u.GenerateFromRealEvo(appPrjPath, "")
|
|
|
|
realPathPairMap := make(map[string]string)
|
|
|
|
for _, UploadFile := range u.UploadPair {
|
|
absLocalFilePath, err := u.GetAbsLocalPath(UploadFile.LocalPath, "")
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
realPathPairMap[absLocalFilePath] = UploadFile.RemotePath
|
|
}
|
|
|
|
u.ClearTOML()
|
|
u.SaveTOML()
|
|
|
|
u.ClearYaml()
|
|
u.SaveYaml()
|
|
}
|