Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
289c49ee
Commit
289c49ee
authored
Apr 09, 2024
by
Eric Pouech
Committed by
Alexandre Julliard
May 07, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/tests: Test calling batch files named as builtin commands.
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
8bbd48bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+20
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+11
-0
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
289c49ee
...
...
@@ -2711,7 +2711,13 @@ echo>robinfile
if 1==1 call del batfile
dir /b
if exist batfile echo batfile shouldn't exist
rem arcane command, first resets errorlevel, second sets it to one
(call )
echo %ErrorLevel%
(call)
echo %ErrorLevel%
rem ... but not for 'if' or 'for'
call :setError 0
call if 1==1 echo bar 2> nul
echo %ErrorLevel%
call :setError 0
...
...
@@ -2738,6 +2744,20 @@ call if 1==1 (
call call call echo passed
cd .. & rd /s/q foobar
echo --- mixing batch and builtins
erase /q echo.bat test.bat 2> NUL
echo @echo foo> echo.bat
echo @echo bar> test.bat & call test.bat
echo @echo.bat bar> test.bat & call test.bat
echo @call echo bar> test.bat & call test.bat
echo @call echo.bat bar> test.bat & call test.bat
erase /q echo.bat 2> NUL
echo @echo bar> test.bat & call test.bat
echo @echo.bat bar> test.bat & call test.bat
echo @call echo bar> test.bat & call test.bat
echo @call echo.bat bar> test.bat & call test.bat
erase /q test.bat 2> NUL
echo ------------ Testing SHIFT ------------
call :shiftFun p1 p2 p3 p4 p5
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
289c49ee
...
...
@@ -1537,6 +1537,8 @@ foo created
Should expand foobaz
batfile
robinfile
0
@todo_wine@1
1
1
non-builtin dir
...
...
@@ -1545,6 +1547,15 @@ Line two
Get if
... and else!
passed
--- mixing batch and builtins
bar@space@
@todo_wine@foo
foo
foo
bar@space@
bat bar@space@
bar@space@
bat bar@space@
------------ Testing SHIFT ------------
'p1' 'p2' 'p3' 'p4' 'p5'
'p2' 'p3' 'p4' 'p5' ''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment