From b7fe0893537f2fc6a28a5beae2399af7b65efd74 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 27 Apr 2013 22:00:51 -0500 Subject: [PATCH] Add Windows rpfix tests --- tests/win32-test-imagex-capture_and_apply.bat | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/win32-test-imagex-capture_and_apply.bat b/tests/win32-test-imagex-capture_and_apply.bat index 458d2b8a..89dd0750 100644 --- a/tests/win32-test-imagex-capture_and_apply.bat +++ b/tests/win32-test-imagex-capture_and_apply.bat @@ -20,6 +20,8 @@ REM REM BEGIN TESTS REM +REM goto :rpfix_tests + call :msg "empty directory" call :do_test if %errorlevel% neq 0 exit /b %errorlevel% @@ -307,10 +309,49 @@ mklink /h link file > nul call :do_test if %errorlevel% neq 0 exit /b %errorlevel% +:rpfix_tests + +echo Testing rpfix junction +md subdir +echo 1 > subdir\file +mklink /j junction subdir > nul +cd .. +wimlib-imagex capture in.dir test.wim > nul +rd /s /q in.dir +wimlib-imagex apply test.wim out.dir > nul +echo 1 > tmp1 +type out.dir\junction\file > tmp2 +fc tmp1 tmp2 > nul +if %errorlevel% neq 0 exit /b %errorlevel% +rd /s /q out.dir +del tmp1 tmp2 +md in.dir +cd in.dir + +echo Testing rpfix exclude +mklink otherlink c:\some\other\directory > nul +cd .. +wimlib-imagex capture in.dir test.wim > nul +wimlib-imagex apply test.wim out.dir > nul +rd out.dir +if %errorlevel% neq 0 exit /b %errorlevel% +rd /s /q in.dir +md in.dir +cd in.dir + +echo Testing rpfix relative +echo 1 > file +mklink relink file > nul +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + REM REM END OF TESTS REM +cd .. +del test.wim +rd /s /q in.dir exit /b 0 :do_test -- 2.43.0