实现链接右键发送、手动地址输入和默认关闭的可选 GET 自动接管,支持站点与文件类型过滤。通过 Native Messaging 和当前用户命名管道在任务入库后确认接管,失败恢复浏览器下载并持久化交接状态。保存请求编号、Referer 与 User-Agent,补充本地注册入口、集成包说明及扩展/stdio/IPC/HTTP 回归测试。
45 lines
1.8 KiB
Batchfile
45 lines
1.8 KiB
Batchfile
@echo off
|
|
setlocal
|
|
set "TTUI_TEST_CONFIG=%~1"
|
|
if "%TTUI_TEST_CONFIG%"=="" set "TTUI_TEST_CONFIG=Debug"
|
|
for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) do set "TTUI_MSBUILD=%%i"
|
|
if not defined TTUI_MSBUILD (
|
|
echo MSBuild not found. Install Visual Studio 2022 C++ workload.
|
|
exit /b 1
|
|
)
|
|
"%TTUI_MSBUILD%" "%~dp0ui\ttui\tests\smoke.vcxproj" -p:Configuration=%TTUI_TEST_CONFIG% -p:Platform=x64 -v:minimal
|
|
if errorlevel 1 exit /b 1
|
|
"%TTUI_MSBUILD%" "%~dp0client\tests\http_transport_tests.vcxproj" -p:Configuration=%TTUI_TEST_CONFIG% -p:Platform=x64 -v:minimal
|
|
if errorlevel 1 exit /b 1
|
|
"%TTUI_MSBUILD%" "%~dp0browser\native\native_host.vcxproj" -p:Configuration=%TTUI_TEST_CONFIG% -p:Platform=x64 -v:minimal
|
|
if errorlevel 1 exit /b 1
|
|
"%TTUI_MSBUILD%" "%~dp0browser\tests\browser_bridge_tests.vcxproj" -p:Configuration=%TTUI_TEST_CONFIG% -p:Platform=x64 -v:minimal
|
|
if errorlevel 1 exit /b 1
|
|
set "BROWSER_HOST_EXE=ttdownloader_native_host.exe"
|
|
if /i "%TTUI_TEST_CONFIG%"=="Debug" set "BROWSER_HOST_EXE=ttdownloader_native_host_d.exe"
|
|
pushd "%~dp0"
|
|
"%~dp0ui\ttui\lib\x64\%TTUI_TEST_CONFIG%\smoke.exe"
|
|
if errorlevel 1 (
|
|
popd
|
|
exit /b 1
|
|
)
|
|
python "%~dp0client\tests\run_http_transport_tests.py" "%~dp0client\bin\tests\%TTUI_TEST_CONFIG%\http_transport_tests.exe"
|
|
if errorlevel 1 (
|
|
popd
|
|
exit /b 1
|
|
)
|
|
"%~dp0client\bin\tests\%TTUI_TEST_CONFIG%\browser_bridge_tests.exe"
|
|
if errorlevel 1 (
|
|
popd
|
|
exit /b 1
|
|
)
|
|
node --test "%~dp0browser\tests\extension.test.mjs"
|
|
if errorlevel 1 (
|
|
popd
|
|
exit /b 1
|
|
)
|
|
python "%~dp0browser\tests\host_stdio_test.py" "%~dp0client\bin\%BROWSER_HOST_EXE%"
|
|
set "TTUI_TEST_EXIT=%ERRORLEVEL%"
|
|
popd
|
|
endlocal & exit /b %TTUI_TEST_EXIT%
|