style(ppt): align PPT palette perfectly with MOMO Pro v2 design tokens (Beige, Warm Ink, Caramel Orange) as per frontend upgrade roadmap

This commit is contained in:
OoO
2026-05-02 15:01:55 +08:00
parent 934adc957c
commit 4c6e4ca5fb
21 changed files with 1400 additions and 549 deletions

View File

@@ -54,7 +54,7 @@ def test_allowed_file():
print(f"❌ 失敗: {description} | 檔名: '{filename}' | 期望: {should_pass} | 實際: {result}")
failed += 1
return passed, failed
assert failed == 0
def test_validate_upload_file():
"""測試完整的檔案上傳驗證"""
@@ -107,7 +107,7 @@ def test_validate_upload_file():
failed += 1
print()
return passed, failed
assert failed == 0
def test_secure_filename_cleaning():
"""測試 secure_filename 的清理效果"""
@@ -136,7 +136,7 @@ def test_secure_filename_cleaning():
print(f" 清理後: '{cleaned}'")
print()
return 0, 0 # 這個測試只是展示,不計入通過/失敗
assert True # 這個測試只是展示,不計入通過/失敗
def main():
"""主測試函數"""
@@ -145,17 +145,13 @@ def main():
print("="*60)
print()
total_passed = 0
total_failed = 0
# 執行所有測試
passed, failed = test_allowed_file()
total_passed += passed
total_failed += failed
passed, failed = test_validate_upload_file()
total_passed += passed
total_failed += failed
try:
test_allowed_file()
test_validate_upload_file()
except AssertionError:
print("\n⚠️ 測試未通過,請檢查!")
return 1
# 展示清理效果(不計入結果)
test_secure_filename_cleaning()
@@ -164,16 +160,11 @@ def main():
print("="*60)
print("測試結果摘要")
print("="*60)
print(f"✅ 通過: {total_passed}")
print(f"❌ 失敗: {total_failed}")
print(f"總計: {total_passed + total_failed}")
print("✅ 通過: 測試函式完成")
print("❌ 失敗: 0")
if total_failed == 0:
print("\n🎉 所有檔案上傳驗證測試通過!")
return 0
else:
print(f"\n⚠️ 有 {total_failed} 個測試失敗,請檢查!")
return 1
print("\n🎉 所有檔案上傳驗證測試通過!")
return 0
if __name__ == "__main__":
sys.exit(main())