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

fix regx issue in windows

上级 94a78276
Run scripts in folder 'C:\Users\aaron\zentaoatf\' on windows OS
From 2019-08-08 13:14:22 to 2019-08-08 13:14:22, spend 0 secs
Total: 2
Pass: 1
Fail: 1
Skip: 0
PASS scripts\tc-100.py
No checkpoints
FAIL scripts\tc-200.py
Step1: FAIL @step2010 第4次尝试登录
Checkpoint1: FAIL
Expect Result CODE: @step2010期望结果, 可以有多行
Actual Result N/A
Step2: FAIL @step2104 再输入1次正确的密码
Checkpoint1: FAIL
Expect Result CODE: @step2104期望结果, 可以有多行
Actual Result N/A
\ No newline at end of file
......@@ -2,23 +2,12 @@ package main
import (
"fmt"
"github.com/easysoft/zentaoatf/src/utils"
"regexp"
)
func main() {
text := ` df
FAIL scripts\tc-200.py
Step1: FAIL @step2010 第4次尝试登录
Checkpoint1: FAIL
Expect Result CODE: @step2010期望结果, 可以有多行
Actual Result N/A
Step2: FAIL @step2104 再输入1次正确的密码
Checkpoint1: FAIL
Expect Result CODE: @step2104期望结果, 可以有多行
Actual Result N/A
dd`
text := utils.ReadFile("result.txt")
str := "(?m:^\\s" + "FAIL\\sscripts\\\\tc-200.py" + "\\n([\\s\\S]*?)((^\\s(PASS|FAIL))|\\z))"
// myExp := regexp.MustCompile("(?m:^\\s(?:PASS|FAIL) scripts\\tc-200.py\n([\\s\\S]*?)((^\\s(PASS|FAIL))|\\z))")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册