]> wimlib.net Git - wimlib/blobdiff - tests/win32-test-imagex-capture_and_apply.bat
Add Windows tests for empty and max length reparse points
[wimlib] / tests / win32-test-imagex-capture_and_apply.bat
index 98064adedea7a92658593a7e5601740f2749c8ee..8f573eceb62bd5ea4c7f8f7ca4b0692fa1ef816f 100644 (file)
@@ -10,8 +10,9 @@ REM Administrator privileges.  wimlib-imagex and win32-tree-cmp must be
 REM executable using the paths set below.\r
 \r
 setlocal EnableDelayedExpansion\r
-set WIN32_TREE_CMP=win32-tree-cmp\r
 set WIMLIB_IMAGEX=wimlib-imagex\r
+set WIN32_TREE_CMP=win32-tree-cmp\r
+set SET_REPARSE_POINT=set_reparse_point\r
 \r
 if exist in.dir rd /S /Q in.dir\r
 if exist out.dir rd /S /Q out.dir\r
@@ -178,6 +179,74 @@ echo "hello world!!!!" > subdir2\otherfile
 call :do_test\r
 if %errorlevel% neq 0 goto :fail\r
 \r
+call :msg "reparse point that is neither a symlink nor a junction"\r
+type nul > file\r
+%SET_REPARSE_POINT% file\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
+call :msg "reparse point with named data streams"\r
+type nul > file\r
+echo 11 > file:a\r
+echo 1 > file:aa\r
+%SET_REPARSE_POINT% file\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
+call :msg "reparse point with unnamed data stream"\r
+echo "test" > file\r
+%SET_REPARSE_POINT% file\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
+call :msg "reparse point with unnamed data stream and named data streams"\r
+echo "test" > file\r
+echo 11 > file:a\r
+echo 1 > file:aa\r
+%SET_REPARSE_POINT% file\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
+call :msg "empty reparse point"\r
+type nul > file\r
+%SET_REPARSE_POINT% file 0\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
+call :msg "empty reparse point with unnamed data stream"\r
+echo hello > file\r
+%SET_REPARSE_POINT% file 0\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
+call :msg "empty reparse point with unnamed data stream and named data streams"\r
+echo hello > file\r
+echo hello > file:ads1\r
+type nul > file:ads2\r
+%SET_REPARSE_POINT% file 0\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
+call :msg "maximum length reparse point"\r
+type nul > file\r
+%SET_REPARSE_POINT% file 16376\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
+call :msg "directory reparse point that is neither a symlink nor a junction"\r
+md subdir\r
+%SET_REPARSE_POINT% subdir\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
+call :msg "directory reparse point with named data streams"\r
+md subdir\r
+echo 11 > subdir:a\r
+echo 1 > subdir:aa\r
+%SET_REPARSE_POINT% subdir\r
+call :do_test\r
+if %errorlevel% neq 0 goto :fail\r
+\r
 call :msg "compressed file"\r
 echo "test" > test\r
 compact /C test > nul\r