提交 1eef442e 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

sync cases with new format

上级 7c32f046
......@@ -11,10 +11,7 @@
期待结果2.1-2
}
- 子步骤2.2 @{
期待结果2.2-1
期待结果2.2-2
}
- 子步骤2.2 @期待结果2.2
- 步骤3
- 步骤4 @期待结果3
*/
......@@ -22,8 +19,8 @@
print("@期待结果1\n");
print("@{\n");
print("期待结果2.1.1\n");
print("期待结果2.1.2\n");
print("期待结果2.1-1\n");
print("期待结果2.1-2\n");
print("}\n");
print("@期待结果2.2\n");
......
......@@ -192,8 +192,8 @@ func getCaseStepContent(stepObj commDomain.ZtfStep, seq string, independentFile
stepContent = stepStr + expectStr
} else {
stepContent = stepStr
if stepObj.Children == nil || len(stepObj.Children) == 0 {
stepContent += " >>"
if (stepObj.Children == nil || len(stepObj.Children) == 0) && expectStr != "" {
stepContent += " @"
}
}
......
......@@ -553,13 +553,14 @@ func ReadLogArr(content string) (isSkip bool, ret [][]string) {
return
}
if line == ">>" { // more than one line
if line == "@{" { // more than one line
model = "multi"
cpArr = make([]string, 0)
} else if model == "multi" { // in >> and >> in multi line mode
} else if model == "multi" { // between line @{ and } in multi line mode
cpArr = append(cpArr, line)
if idx == len(lines)-1 || strings.Index(lines[idx+1], ">>") > -1 {
//if idx == len(lines)-1 || strings.Index(lines[idx+1], "}") > -1 {
if idx == len(lines)-1 || strings.TrimSpace(lines[idx+1]) == "}" {
temp := make([]string, 0)
temp = append(temp, cpArr...)
......@@ -573,6 +574,11 @@ func ReadLogArr(content string) (isSkip bool, ret [][]string) {
model = "single"
line = strings.TrimSpace(line)
if strings.Index(line, "@") != 0 { // ignore the line not started with @
continue
}
line = line[1:]
cpArr = append(cpArr, line)
ret = append(ret, cpArr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册