diff --git a/src/biz/exe.go b/src/biz/exe.go index fb0e5a2fa0a073980c4c5d18184bfcdd251ab8bc..9f476398882326fa22f7470d754253dd424efae6 100644 --- a/src/biz/exe.go +++ b/src/biz/exe.go @@ -24,7 +24,6 @@ func ExeScripts(files []string, scriptDir string, langType string, report *model report.EndTime = startTime report.Duration = secs - } func ExeScript(file string, langType string, scriptDir string) { diff --git a/src/test.go b/src/test.go index 2eee1f2b07996245098c9a4f40ee46f2145ff188..471ccacd9578a66488e7d211472eaaa589aa0f4b 100644 --- a/src/test.go +++ b/src/test.go @@ -2,26 +2,11 @@ package main import ( "fmt" - "regexp" + "path" ) func main() { - text := ` df - FAIL scripts/tc-200.py - Step1: FAIL @step2010 第4次尝试登录 - Checkpoint1: FAIL - Expect Result CODE: @step2010期望结果, 可以有多行 - Actual Result N/A + a := path.Base("ss/1.txt") - Step2: FAIL @step2104 再输入1次正确的密码 - Checkpoint1: FAIL - Expect Result CODE: @step2104期望结果, 可以有多行 - Actual Result N/A - -dd` - - myExp := regexp.MustCompile("(?m:^\\s(?:PASS|FAIL) scripts/tc-200.py\n([\\s\\S]*?)((^\\s(PASS|FAIL))|\\z))") - arr := myExp.FindStringSubmatch(text) - - fmt.Println(arr[1]) + fmt.Println(a) }