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
8b1d8e9e
Commit
8b1d8e9e
authored
Jul 23, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Jul 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/tests: Add tests for & (un)conditional execution.
parent
d1e15bac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+16
-3
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+6
-0
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
8b1d8e9e
...
...
@@ -94,6 +94,19 @@ echo P%ERRORLEVEL%
echo %ERRORLEVEL%S
echo P%ERRORLEVEL%S
echo ------------ Testing conditional execution --------------
echo ...unconditional ^&
call :setError 123 & echo foo1
echo bar2 & echo foo2
mkdir foobar & cd foobar
echo > foobazbar
cd .. & rd /s/q foobar
if exist foobazbar (
echo foobar not deleted!
cd ..
rd /s/q foobar
) else echo foobar deleted
echo ------------ Testing type ------------
echo bar> foobaz
@echo on
...
...
@@ -105,7 +118,7 @@ echo ***
del foobaz
echo ------------ Testing NUL ------------
md foobar &
&
cd foobar
md foobar & cd foobar
rem NUL file (non) creation + case insensitivity
rem Note: "if exist" does not work with NUL, so to check for file existence we use a kludgy workaround
echo > bar
...
...
@@ -277,7 +290,7 @@ echo %ErrorLevel%
rem Trailing backslashes
mkdir foo\\\\
echo %ErrorLevel%
if exist foo (rmdir foo &
&
echo dir created
if exist foo (rmdir foo & echo dir created
) else ( echo dir not created )
echo %ErrorLevel%
rem Invalid chars
...
...
@@ -289,7 +302,7 @@ echo %ErrorLevel%
call :setError 0
mkdir foo\?
echo %ErrorLevel%
if exist foo (rmdir foo &
&
echo ok, foo created
if exist foo (rmdir foo & echo ok, foo created
) else ( echo foo not created )
call :setError 0
mkdir foo\bar\?
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
8b1d8e9e
...
...
@@ -90,6 +90,12 @@ ERRORLEVEL
P0
0S
P0S
------------ Testing conditional execution --------------
@todo_wine@...unconditional &
foo1
bar2@space@
foo2
@todo_wine@foobar deleted
------------ Testing type ------------
@pwd@>type foobaz@space@
...
...
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