]> wimlib.net Git - wimlib/commitdiff
Update Windows test script
authorEric Biggers <ebiggers3@gmail.com>
Wed, 18 Feb 2015 02:42:42 +0000 (20:42 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 18 Feb 2015 03:15:30 +0000 (21:15 -0600)
tests/win32-test-imagex-capture_and_apply.bat

index 78216703ede84ead45b461a559534c3226fde6bf..cc19dd9803f2353bea10ad27f65c2e7ebd7019f9 100644 (file)
@@ -61,6 +61,12 @@ type nul > emptyfile
 call :do_test\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
 \r
+call :msg "hard linked empty file"\r
+type nul > file\r
+mklink /h link file > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
 call :msg "various hard linked, identical, different, and empty files"\r
 echo 1 > file\r
 echo 5 > file\r
@@ -387,6 +393,14 @@ cipher /d 1\2\file > nul
 call :do_test\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
 \r
+call :msg "encrypted directory with alternate data streams"\r
+md subdir\r
+cipher /e subdir > nul\r
+echo ads1 > subdir:ads1\r
+echo ads2 > subdir:ads2\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
 echo hello > file:ads\r
@@ -449,22 +463,16 @@ if %errorlevel% neq 0 (
        exit /b %errorlevel%\r
 )\r
 \r
-REM Fun fact:  There are bugs in Microsoft's imagex.exe that make it fail some\r
-REM of our tests.\r
-REM\r
-REM rd /S /Q out.dir\r
-REM md out.dir\r
-REM imagex /capture in.dir test.wim "test" /norpfix > nul\r
+REM Fun fact: Microsoft's WIMGAPI has bugs that make it fail some of our tests.\r
+REM Even the Windows 8.1 version has incorrect behavior with empty files with\r
+REM multiple links, or files with named data streams and multiple links.\r
+rd /S /Q out.dir\r
+md out.dir\r
+REM dism /capture-image /capturedir:in.dir /imagefile:test.wim /name:"test" /norpfix > nul\r
 REM if %errorlevel% neq 0 exit /b %errorlevel%\r
-REM imagex /apply test.wim 1 out.dir > nul\r
-REM if %errorlevel% neq 0 exit /b %errorlevel%\r
-REM %WIN32_TREE_CMP% in.dir out.dir\r
-REM if %errorlevel% neq 0 (\r
-       REM echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-       REM echo            TEST FAILED!!!!!!! ^(imagex^)\r
-       REM echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
-       REM exit /b %errorlevel%\r
-REM )\r
+dism /apply-image /imagefile:test.wim /index:1 /applydir:out.dir > nul\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+%WIN32_TREE_CMP% in.dir out.dir\r
 \r
 rd /S /Q in.dir out.dir\r
 md in.dir\r