]> wimlib.net Git - wimlib/blobdiff - tests/win32-test-imagex-capture_and_apply.bat
Add Windows rpfix tests
[wimlib] / tests / win32-test-imagex-capture_and_apply.bat
index 458d2b8a235caaa2ed43e849bb1b29e0313ed9c7..89dd07501b2c0990b8fd240008f240b72cadf8f3 100644 (file)
@@ -20,6 +20,8 @@ REM
 REM BEGIN TESTS\r
 REM\r
 \r
+REM goto :rpfix_tests\r
+\r
 call :msg "empty directory"\r
 call :do_test\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
@@ -307,10 +309,49 @@ mklink /h link file > nul
 call :do_test\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
 \r
+:rpfix_tests\r
+\r
+echo Testing rpfix junction\r
+md subdir\r
+echo 1 > subdir\file\r
+mklink /j junction subdir > nul\r
+cd ..\r
+wimlib-imagex capture in.dir test.wim > nul\r
+rd /s /q in.dir\r
+wimlib-imagex apply test.wim out.dir > nul\r
+echo 1 > tmp1\r
+type out.dir\junction\file > tmp2\r
+fc tmp1 tmp2 > nul\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+rd /s /q out.dir\r
+del tmp1 tmp2\r
+md in.dir\r
+cd in.dir\r
+\r
+echo Testing rpfix exclude\r
+mklink otherlink c:\some\other\directory > nul\r
+cd ..\r
+wimlib-imagex capture in.dir test.wim > nul\r
+wimlib-imagex apply test.wim out.dir > nul\r
+rd out.dir\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+rd /s /q in.dir\r
+md in.dir\r
+cd in.dir\r
+\r
+echo Testing rpfix relative\r
+echo 1 > file\r
+mklink relink file > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
 REM\r
 REM END OF TESTS\r
 REM\r
 \r
+cd ..\r
+del test.wim\r
+rd /s /q in.dir\r
 exit /b 0\r
 \r
 :do_test\r