+\r
+REM Note: since object IDs must be unique per filesystem, we can't expect them\r
+REM to preserved using our testing scheme. Therefore, win32-tree-cmp doesn't\r
+REM compare them, and the below tests really just ensure the object ID code is\r
+REM run to some extent.\r
+\r
+call :msg "file with object ID"\r
+echo hello > file\r
+fsutil objectid create file > nul\r
+call :do_test\r
+\r
+call :msg "directory with object ID"\r
+md subdir\r
+fsutil objectid set f67394c12b17608e1d050d181ba8ffd2 7df80cbdf620f4c82c79b9e6799147b6 97621aff72915ade05abb96b15dea1a3 e0bda4caa9e33cfd461c92c16be9713d subdir\r
+call :do_test\r
+\r
+call :msg "sparse files"\r
+fsutil file createnew sparse 1000000 > nul\r
+fsutil sparse setflag sparse\r
+fsutil sparse setrange sparse 0 1000000\r
+\r
+fsutil file createnew mostly_sparse 1000000 > nul\r
+fsutil sparse setflag mostly_sparse\r
+fsutil sparse setrange mostly_sparse 0 1000000\r
+echo hello >> mostly_sparse\r
+type sparse >> mostly_sparse\r
+fsutil sparse setrange mostly_sparse 1000100 2000000\r
+call :do_test\r
+\r
+call :msg "sparse and compressed files"\r
+fsutil file createnew sparse 1000000 > nul\r
+fsutil sparse setflag sparse\r
+fsutil sparse setrange sparse 0 1000000\r
+compact /c sparse > nul\r
+\r
+fsutil file createnew mostly_sparse 1000000 > nul\r
+fsutil sparse setflag mostly_sparse\r
+fsutil sparse setrange mostly_sparse 0 1000000\r
+echo hello >> mostly_sparse\r
+type sparse >> mostly_sparse\r
+fsutil sparse setrange mostly_sparse 1000100 2000000\r
+compact /c mostly_sparse > nul\r
+\r
+type nul > compressed_first\r
+compact /c compressed_first > nul\r
+type sparse >> compressed_first\r
+fsutil sparse setflag compressed_first\r
+fsutil sparse setrange compressed_first 0 500000\r
+call :do_test\r
+\r
+:rpfix_tests\r
+\r
+echo Testing rpfix junction\r
+md subdir\r
+echo 1 > subdir\file\r
+mklink /j junction subdir > nul\r
+cd ..\r
+%WIMLIB_IMAGEX% capture in.dir test.wim > nul\r
+rd /s /q in.dir\r
+%WIMLIB_IMAGEX% apply test.wim out.dir > nul\r
+echo 1 > tmp1\r
+type out.dir\junction\file > tmp2\r
+fc tmp1 tmp2 > nul\r
+if %errorlevel% neq 0 goto :fail\r
+rd /s /q out.dir\r
+del tmp1 tmp2\r
+md in.dir\r
+cd in.dir\r
+\r
+echo Testing rpfix relative\r
+echo 1 > file\r
+mklink relink file > nul\r
+cd ..\r
+%WIMLIB_IMAGEX% capture in.dir test.wim > nul\r
+%WIMLIB_IMAGEX% apply test.wim out.dir > nul\r
+type out.dir\relink > out.dir\tmp\r
+if %errorlevel% neq 0 goto :fail\r
+fc in.dir\file out.dir\tmp > nul\r
+if %errorlevel% neq 0 goto :fail\r
+rd /s /q in.dir out.dir\r
+md in.dir\r
+cd in.dir\r