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

stdin

上级 f8d62aea
...@@ -126,7 +126,7 @@ func isRunWithSuiteFile(files []string) (string, string) { ...@@ -126,7 +126,7 @@ func isRunWithSuiteFile(files []string) (string, string) {
if path.Ext(file) == "."+constant.ExtNameSuite { if path.Ext(file) == "."+constant.ExtNameSuite {
suiteFile = file suiteFile = file
} else { } else {
if fileUtils.IsDir(file) && dir != "" { // only select the first dir if fileUtils.IsDir(file) && dir == "" { // only select the first dir
dir = file dir = file
} }
} }
...@@ -147,7 +147,7 @@ func isRunWithResultFile(files []string) string { ...@@ -147,7 +147,7 @@ func isRunWithResultFile(files []string) string {
var resultFile string var resultFile string
for _, file := range files { for _, file := range files {
if path.Ext(file) == "."+constant.ExtNameResult { if path.Ext(file) == "."+constant.ExtNameResult || path.Ext(file) == "."+constant.ExtNameJson {
resultFile = file resultFile = file
return resultFile return resultFile
......
...@@ -107,7 +107,7 @@ func main() { ...@@ -107,7 +107,7 @@ func main() {
action.View(files, keywords) action.View(files, keywords)
} }
case "set", "-s": case "set", "-set":
action.InputForSet() action.InputForSet()
case "help", "-h": case "help", "-h":
......
...@@ -137,7 +137,9 @@ func GetFailedCasesDirectlyFromTestResult(resultFile string) []string { ...@@ -137,7 +137,9 @@ func GetFailedCasesDirectlyFromTestResult(resultFile string) []string {
json.Unmarshal([]byte(content), &report) json.Unmarshal([]byte(content), &report)
for _, cs := range report.Cases { for _, cs := range report.Cases {
cases = append(cases, cs.Path) if cs.Status != "pass" {
cases = append(cases, cs.Path)
}
} }
return cases return cases
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册