]> wimlib.net Git - wimlib/blobdiff - tests/win32-test-imagex-capture_and_apply.bat
win32-test-imagex-capture_and_apply.bat: add some tests
[wimlib] / tests / win32-test-imagex-capture_and_apply.bat
index 2ce8febb0876289f10054a37085554a36e3b1c2a..0434893bf16c26ad0d53ac33eb81bedb430c7b4c 100644 (file)
@@ -22,8 +22,6 @@ 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
@@ -89,6 +87,38 @@ type nul > subdir2\emptyfile
 call :do_test\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
 \r
+call :msg "file with custom security descriptor"\r
+echo hello > file\r
+icacls file /deny Administrator:F > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+call :msg "directory with custom security descriptor (inheritence enabled)"\r
+md subdir\r
+icacls subdir /inheritance:e > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+call :msg "directory with custom security descriptor (inheritence disabled)"\r
+md subdir\r
+icacls subdir /inheritance:d > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+REM            win32-tree-cmp can't handle this case.\r
+REM\r
+REM call :msg "file with custom security descriptor (all inherited ACEs removed)"\r
+REM echo hello > file\r
+REM icacls file /inheritance:r > nul\r
+REM call :do_test\r
+REM if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+call :msg "file with custom integrity level"\r
+echo hello > file\r
+icacls file /setintegritylevel H > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
 call :msg "relative symlink"\r
 mklink relink dest > nul\r
 call :do_test\r
@@ -261,12 +291,36 @@ attrib +h hidden
 call :do_test\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
 \r
+call :msg "hidden system file"\r
+echo 1 > file\r
+attrib +h +s file\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+call :msg "hidden, readonly, system file"\r
+echo 1 > file\r
+attrib +h +r +s file\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
 call :msg "hidden directory"\r
 md subdir\r
 attrib +h subdir\r
 call :do_test\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
 \r
+call :msg "hidden system directory"\r
+echo 1 > subdir\r
+attrib +h +s subdir\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+call :msg "hidden, readonly, system directory"\r
+echo 1 > subdir\r
+attrib +h +r +s subdir\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
 call :msg "encrypted file"\r
 echo "hello" > encrypted\r
 cipher /e encrypted > nul\r
@@ -303,6 +357,24 @@ cipher /d subdir\1 > nul
 call :do_test\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
 \r
+call :msg "encrypted root directory"\r
+cd ..\r
+cipher /e in.dir > nul\r
+cd in.dir\r
+echo "hello" > encrypted\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+call :msg "unencrypted file in encrypted directory in compressed directory"\r
+md 1\r
+md 1\2\r
+compact /c 1 > /nul\r
+cipher /e 1\2 > /nul\r
+echo hello > 1\2\file\r
+cipher /d 1\2\file > /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
 echo hello > file:ads\r