]> wimlib.net Git - wimlib/blobdiff - tests/win32-test-imagex-capture_and_apply.bat
Support for encrypted restore
[wimlib] / tests / win32-test-imagex-capture_and_apply.bat
index 023beaf4a8329ee6e93f6c183dad682dcd17d7cc..6e2bebafd995c6169ae0a34b8de365fa51f72a99 100644 (file)
@@ -257,6 +257,56 @@ attrib +h hidden
 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 "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 "identical encrypted files"\r
+echo "hello" > encrypted1\r
+echo "hello" > encrypted2\r
+cipher /e encrypted1 > nul\r
+cipher /e encrypted2 > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+call :msg "encrypted directory"\r
+md subdir\r
+cipher /e subdir > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+call :msg "encrypted directory with encrypted file in it"\r
+md subdir\r
+echo 1 > subdir\1\r
+cipher /e subdir > nul\r
+cipher /e subdir\1 > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
+REM call :msg "encrypted directory with unencrypted file in it"\r
+REM md subdir\r
+REM echo 1 > subdir\1\r
+REM cipher /e subdir > nul\r
+REM cipher /d subdir\1 > nul\r
+REM call :do_test\r
+REM 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
+cipher /e file > nul\r
+mklink /h link file > nul\r
+call :do_test\r
+if %errorlevel% neq 0 exit /b %errorlevel%\r
+\r
 REM\r
 REM END OF TESTS\r
 REM\r