fix(tests): force real multi-volume fixture with 512KB stored payload

The earlier -v200k split never produced part2 because the payload was a
few hundred bytes. Now generates a 512KB incompressible file (fsutil +
-m0 store) so vol.part1/2/3.rar actually exist for the volume test.
This commit is contained in:
Songlx516 committed 2026-09-05 22:59:21 +08:00
1 parent 3db921e408
commit 68056f2d9f
1 file changed
+10 -2
+10 -2
View File
@@ -32,9 +32,17 @@ echo [1/4] RAR5 v6 single volume - basic-v6.rar
"%RAREXE%" a -ep1 -m2 -ma5 -idq "%FIX%\basic-v6.rar" "%STAGE%\root.txt" "%STAGE%\dir\nested.txt" "%STAGE%\b.bin"
if errorlevel 1 echo [FAIL] & goto :bad
echo [2/4] RAR5 v6 multi-volume - vol.part1.rar + vol.part2.rar
"%RAREXE%" a -ep1 -m2 -ma5 -v200k -idq "%FIX%\vol.part1.rar" "%STAGE%\root.txt" "%STAGE%\dir\nested.txt" "%STAGE%\b.bin"
echo [2/4] RAR5 v6 multi-volume - vol.part1.rar + vol.part2.rar + ...
REM Create a 512 KB incompressible payload so -v200k actually splits it.
fsutil file createnew "%STAGE%\big.bin" 524288 >nul 2>nul
if not exist "%STAGE%\big.bin" (
echo [WARN] fsutil unavailable - cannot force multi-volume; skipping
goto :aftervol
)
"%RAREXE%" a -ep1 -m0 -ma5 -v200k -idq "%FIX%\vol.part1.rar" "%STAGE%\big.bin" "%STAGE%\root.txt"
if errorlevel 1 echo [FAIL] & goto :bad
echo wrote: & dir /b "%FIX%\vol.part*.rar" 2>nul
:aftervol
echo [3/4] RAR5 v6 encrypted (password: secret123) - enc-v6.rar
"%RAREXE%" a -ep1 -m2 -ma5 -psecret123 -idq "%FIX%\enc-v6.rar" "%STAGE%\root.txt" "%STAGE%\dir\nested.txt"