feat(utils, templates, docs): file-based templates + stronger README
This commit is contained in:
36
problems/0042-answer-to-everything/test/run_tests.sh
Executable file
36
problems/0042-answer-to-everything/test/run_tests.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "🧪 執行測試: 0042-answer-to-everything"
|
||||
echo "=========================="
|
||||
|
||||
pushd "$(dirname "$0")" >/dev/null
|
||||
|
||||
echo "📋 C# 測試結果:"
|
||||
if (cd ../csharp && dotnet build >/dev/null 2>&1); then
|
||||
if dotnet test --logger "console;verbosity=minimal" >/dev/null 2>&1; then
|
||||
echo "✅ C# 測試通過"
|
||||
else
|
||||
echo "❌ C# 測試失敗"
|
||||
fi
|
||||
else
|
||||
echo "❌ C# 編譯失敗"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "📋 Go 測試結果:"
|
||||
if (cd ../go && go build >/dev/null 2>&1); then
|
||||
if go test -v >/dev/null 2>&1; then
|
||||
echo "✅ Go 測試通過"
|
||||
else
|
||||
echo "❌ Go 測試失敗(顯示詳細)"
|
||||
go test -v
|
||||
fi
|
||||
else
|
||||
echo "❌ Go 編譯失敗"
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
echo ""
|
||||
echo "📊 測試完成!"
|
||||
|
Reference in New Issue
Block a user