feat(utils,templates,docs): file-based .tmpl templates; remove I/O fixtures
This commit is contained in:
@@ -62,8 +62,6 @@ problems/NNNN-name/
|
|||||||
├── SolutionTests.cs # xUnit 測試
|
├── SolutionTests.cs # xUnit 測試
|
||||||
├── TestProject.csproj
|
├── TestProject.csproj
|
||||||
├── main_test.go # Go testing
|
├── main_test.go # Go testing
|
||||||
├── input1.txt / output1.txt
|
|
||||||
├── input2.txt / output2.txt
|
|
||||||
├── edge_cases.md
|
├── edge_cases.md
|
||||||
└── run_tests.sh # 一鍵執行 C# 與 Go 測試
|
└── run_tests.sh # 一鍵執行 C# 與 Go 測試
|
||||||
```
|
```
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
# 測試案例 1 輸入(42 Answer To Everything)
|
|
||||||
|
|
@@ -1,2 +0,0 @@
|
|||||||
# 測試案例 2 輸入(42 Answer To Everything)
|
|
||||||
|
|
@@ -1,2 +0,0 @@
|
|||||||
# 測試案例 1 期望輸出(42 Answer To Everything)
|
|
||||||
|
|
@@ -1,2 +0,0 @@
|
|||||||
# 測試案例 2 期望輸出(42 Answer To Everything)
|
|
||||||
|
|
@@ -1,2 +0,0 @@
|
|||||||
# 測試案例 1 輸入({{NUMBER}} {{NAME_TITLE}})
|
|
||||||
|
|
@@ -1,2 +0,0 @@
|
|||||||
# 測試案例 2 輸入({{NUMBER}} {{NAME_TITLE}})
|
|
||||||
|
|
@@ -1,2 +0,0 @@
|
|||||||
# 測試案例 1 期望輸出({{NUMBER}} {{NAME_TITLE}})
|
|
||||||
|
|
@@ -1,2 +0,0 @@
|
|||||||
# 測試案例 2 期望輸出({{NUMBER}} {{NAME_TITLE}})
|
|
||||||
|
|
@@ -71,15 +71,6 @@ create_test_files() {
|
|||||||
"$problem_dir/test/edge_cases.md" \
|
"$problem_dir/test/edge_cases.md" \
|
||||||
"$number" "$number_pad" "$name_slug" "$name_title" "$difficulty" "$today" "$year_month"
|
"$number" "$number_pad" "$name_slug" "$name_title" "$difficulty" "$today" "$year_month"
|
||||||
|
|
||||||
render_template "$TEMPLATES_DIR/problem/test/input1.txt.tmpl" "$problem_dir/test/input1.txt" \
|
|
||||||
"$number" "$number_pad" "$name_slug" "$name_title" "$difficulty" "$today" "$year_month"
|
|
||||||
render_template "$TEMPLATES_DIR/problem/test/output1.txt.tmpl" "$problem_dir/test/output1.txt" \
|
|
||||||
"$number" "$number_pad" "$name_slug" "$name_title" "$difficulty" "$today" "$year_month"
|
|
||||||
render_template "$TEMPLATES_DIR/problem/test/input2.txt.tmpl" "$problem_dir/test/input2.txt" \
|
|
||||||
"$number" "$number_pad" "$name_slug" "$name_title" "$difficulty" "$today" "$year_month"
|
|
||||||
render_template "$TEMPLATES_DIR/problem/test/output2.txt.tmpl" "$problem_dir/test/output2.txt" \
|
|
||||||
"$number" "$number_pad" "$name_slug" "$name_title" "$difficulty" "$today" "$year_month"
|
|
||||||
|
|
||||||
render_template "$TEMPLATES_DIR/problem/test/run_tests.sh.tmpl" \
|
render_template "$TEMPLATES_DIR/problem/test/run_tests.sh.tmpl" \
|
||||||
"$problem_dir/test/run_tests.sh" \
|
"$problem_dir/test/run_tests.sh" \
|
||||||
"$number" "$number_pad" "$name_slug" "$name_title" "$difficulty" "$today" "$year_month"
|
"$number" "$number_pad" "$name_slug" "$name_title" "$difficulty" "$today" "$year_month"
|
||||||
|
Reference in New Issue
Block a user