]> 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 6e2bebafd995c6169ae0a34b8de365fa51f72a99..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
@@ -291,13 +293,13 @@ cipher /e subdir\1 > nul
 call :do_test\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
 \r
-REM call :msg "encrypted directory with unencrypted file in it"\r
-REM md subdir\r
-REM echo 1 > subdir\1\r
-REM cipher /e subdir > nul\r
-REM cipher /d subdir\1 > nul\r
-REM call :do_test\r
-REM if %errorlevel% neq 0 exit /b %errorlevel%\r
+call :msg "encrypted directory with unencrypted file in it"\r
+md subdir\r
+echo 1 > subdir\1\r
+cipher /e subdir > nul\r
+cipher /d subdir\1 > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
 \r
 call :msg "hardlinked, encrypted file with alternate data streams"\r
 echo hello > file\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