diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..28a804d8932aba40f168fd757a74cb718a955a1a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000000000000000000000000000000000..9751664930fee95ad101ef14c188ce3c389a1a7b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..ade06b67d75b431af22b8d85917dc51bfa72bbe7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/zentaoatf.iml b/.idea/zentaoatf.iml new file mode 100644 index 0000000000000000000000000000000000000000..c956989b29ad0767edc6cf3a202545927c3d1e76 --- /dev/null +++ b/.idea/zentaoatf.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/gen-project.go b/src/gen-project.go index 91b93bee3a4b007ed168460968b1d868e199f2c9..b15505095497ccc65f7174e69d34e800251ba1dd 100644 --- a/src/gen-project.go +++ b/src/gen-project.go @@ -44,7 +44,7 @@ func DealwithTestCase(tc model.TestCase, langType string, independentExpect bool } template := utils.ReadFile("xdoc/script-template.txt") - content := string(fmt.Sprintf(string(template), langType, caseTitle, caseId, + content := string(fmt.Sprintf(string(template), langType, caseId, caseTitle, strings.Join(steps, "\n"), expectsTxt, strings.Join(srcCode, "\n"))) fmt.Println(content) @@ -100,7 +100,7 @@ func DealwithTestStep(ts model.TestStep, langType string, level int, stepWidth i expectsLine := "" expectsLine = "# \n" - expectsLine += "/* " + stepIdent + " 期望结果, 可以有多行 */\n" + expectsLine += "/* " + stepIdent + "期望结果, 可以有多行 */\n" *expects = append(*expects, expectsLine) } @@ -115,7 +115,7 @@ func DealwithTestStep(ts model.TestStep, langType string, level int, stepWidth i codeLine += `println("#")\n` } - codeLine += " // 开始" + stepIdent + " - " + stepExpect + "\n" + codeLine += " // " + stepIdent + ": " + stepExpect + "\n" codeLine += "/* 输出验证点实际结果 */\n" *srcCode = append(*srcCode, codeLine) diff --git a/xdoc/sample/README b/xdoc/sample/README new file mode 100644 index 0000000000000000000000000000000000000000..17498c843a5651b23728b2fb551d9cca49c375de --- /dev/null +++ b/xdoc/sample/README @@ -0,0 +1 @@ +TODO: \ No newline at end of file diff --git a/xdoc/script-template.txt b/xdoc/script-template.txt index cb7cc15f5de986738ce8986f2ecc6662517ef3b5..b2ea88493aa7f580d60916e8560bad222dd02535 100644 --- a/xdoc/script-template.txt +++ b/xdoc/script-template.txt @@ -1,12 +1,16 @@ diff --git a/xdoc/scripts/tc-200.php b/xdoc/scripts/tc-200.php index f3b4610c579ebfe9d066299a67326f731147dcc4..2d6ae94aa21826c24cd5042d8596ff34738788e2 100644 --- a/xdoc/scripts/tc-200.php +++ b/xdoc/scripts/tc-200.php @@ -1,8 +1,8 @@ diff --git a/xdoc/scripts/tc-300.php b/xdoc/scripts/tc-300.php index e8194fa5ac5f5a71dedd1acea532dbbbf46bd9f1..8823c5fad89c0bad1cce7494f8fc376dc266aaf8 100644 --- a/xdoc/scripts/tc-300.php +++ b/xdoc/scripts/tc-300.php @@ -1,12 +1,15 @@