Eric Pouech : cmd/tests: Test paths that exceed MAX_PATH.
Alexandre Julliard
julliard at winehq.org
Tue Jan 25 15:41:20 CST 2022
Module: wine
Branch: master
Commit: 1d178982ae5a73b18f367026c8689b56789c39fd
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1d178982ae5a73b18f367026c8689b56789c39fd
Author: Eric Pouech <eric.pouech at gmail.com>
Date: Fri Jan 21 10:33:05 2022 +0100
cmd/tests: Test paths that exceed MAX_PATH.
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/cmd/tests/test_builtins.cmd | 19 +++++++++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 4 ++++
2 files changed, 23 insertions(+)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 47b028207ac..56a682577bd 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -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
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 4c7bc3e0c02..8b6e0914112 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -1687,6 +1687,10 @@ Normal+space+garbage
Quoted should fail
Normal+tab
Normal+tab+garbage
+------------ Testing length wrt. MAX_PATH ------------
+ at todo_wine@21
+Success
+ at todo_wine@Success
------------ Testing combined CALLs/GOTOs ------------
world
cheball
More information about the wine-cvs
mailing list