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
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
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
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