Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
1eef442e
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
11 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1eef442e
编写于
3月 23, 2023
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sync cases with new format
上级
7c32f046
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
11 deletion
+14
-11
demo/t/9_new_format.php
demo/t/9_new_format.php
+3
-6
internal/pkg/helper/script/generator.go
internal/pkg/helper/script/generator.go
+2
-2
internal/pkg/helper/script/parser.go
internal/pkg/helper/script/parser.go
+9
-3
未找到文件。
demo/t/9_new_format.php
浏览文件 @
1eef442e
...
...
@@ -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
"
);
...
...
internal/pkg/helper/script/generator.go
浏览文件 @
1eef442e
...
...
@@ -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
+=
"
@
"
}
}
...
...
internal/pkg/helper/script/parser.go
浏览文件 @
1eef442e
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录