cmd/tests: Test paths that exceed MAX_PATH.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-01-21 10:33:05 +01:00 committed by Alexandre Julliard
parent 23817bb8d9
commit 1d178982ae
2 changed files with 23 additions and 0 deletions

View File

@ -3333,6 +3333,25 @@ if errorlevel 1 echo Normal+tab+garbage drive change failed
popd
echo ------------ Testing length wrt. MAX_PATH ------------
rem native cmd limits all path lengths to MAX_PATH=260
pushd c:\
set depth=25
for /L %%d in (0,1,25) do (
mkdir abcdefghij > NUL 2>&1
if exist abcdefghij (
cd abcdefghij
set depth=%%d
)
)
echo %depth%
rem even relative paths are transformed to absolute, and tested against MAX_PATH
echo abc > 01234567890123
if exist 01234567890123 (echo Success) else echo Failure
echo abc > 012345678901234
if exist 012345678901234 (echo Failure) else echo Success
popd
rmdir /s /q c:\abcdefghij
echo ------------ Testing combined CALLs/GOTOs ------------
echo @echo off>foo.cmd
echo goto :eof>>foot.cmd

View File

@ -1687,6 +1687,10 @@ Normal+space+garbage
Quoted should fail
Normal+tab
Normal+tab+garbage
------------ Testing length wrt. MAX_PATH ------------
@todo_wine@21
Success
@todo_wine@Success
------------ Testing combined CALLs/GOTOs ------------
world
cheball