From: Eric Biggers Date: Thu, 29 Jan 2015 04:26:11 +0000 (-0600) Subject: win32-test-imagex-capture_and_apply.bat: add some tests X-Git-Tag: v1.8.0~36 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=5160ef1283a971f7d166bfa434c0f4443d6f6f9a win32-test-imagex-capture_and_apply.bat: add some tests --- diff --git a/tests/win32-test-imagex-capture_and_apply.bat b/tests/win32-test-imagex-capture_and_apply.bat index 2ce8febb..0434893b 100644 --- a/tests/win32-test-imagex-capture_and_apply.bat +++ b/tests/win32-test-imagex-capture_and_apply.bat @@ -22,8 +22,6 @@ REM REM BEGIN TESTS REM -REM goto :rpfix_tests - call :msg "empty directory" call :do_test if %errorlevel% neq 0 exit /b %errorlevel% @@ -89,6 +87,38 @@ type nul > subdir2\emptyfile call :do_test if %errorlevel% neq 0 exit /b %errorlevel% +call :msg "file with custom security descriptor" +echo hello > file +icacls file /deny Administrator:F > nul +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + +call :msg "directory with custom security descriptor (inheritence enabled)" +md subdir +icacls subdir /inheritance:e > nul +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + +call :msg "directory with custom security descriptor (inheritence disabled)" +md subdir +icacls subdir /inheritance:d > nul +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + +REM win32-tree-cmp can't handle this case. +REM +REM call :msg "file with custom security descriptor (all inherited ACEs removed)" +REM echo hello > file +REM icacls file /inheritance:r > nul +REM call :do_test +REM if %errorlevel% neq 0 exit /b %errorlevel% + +call :msg "file with custom integrity level" +echo hello > file +icacls file /setintegritylevel H > nul +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + call :msg "relative symlink" mklink relink dest > nul call :do_test @@ -261,12 +291,36 @@ attrib +h hidden call :do_test if %errorlevel% neq 0 exit /b %errorlevel% +call :msg "hidden system file" +echo 1 > file +attrib +h +s file +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + +call :msg "hidden, readonly, system file" +echo 1 > file +attrib +h +r +s file +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + call :msg "hidden directory" md subdir attrib +h subdir call :do_test if %errorlevel% neq 0 exit /b %errorlevel% +call :msg "hidden system directory" +echo 1 > subdir +attrib +h +s subdir +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + +call :msg "hidden, readonly, system directory" +echo 1 > subdir +attrib +h +r +s subdir +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + call :msg "encrypted file" echo "hello" > encrypted cipher /e encrypted > nul @@ -303,6 +357,24 @@ cipher /d subdir\1 > nul call :do_test if %errorlevel% neq 0 exit /b %errorlevel% +call :msg "encrypted root directory" +cd .. +cipher /e in.dir > nul +cd in.dir +echo "hello" > encrypted +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + +call :msg "unencrypted file in encrypted directory in compressed directory" +md 1 +md 1\2 +compact /c 1 > /nul +cipher /e 1\2 > /nul +echo hello > 1\2\file +cipher /d 1\2\file > /nul +call :do_test +if %errorlevel% neq 0 exit /b %errorlevel% + call :msg "hardlinked, encrypted file with alternate data streams" echo hello > file echo hello > file:ads