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
a91eceae
Commit
a91eceae
authored
Aug 20, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/tests: Add tests for tab handling.
parent
453996fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
2 deletions
+80
-2
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+37
-2
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+43
-0
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
a91eceae
...
...
@@ -17,6 +17,14 @@ echo:word
echo :word
echo word@space@
echo word@space@@space@
echo word
echo@tab@word
echo@tab@word @tab@
echo@tab@word@tab@@space@
@tab@echo word
echo @tab@word
echo @tab@word
echo@tab@@tab@word
@echo off
echo ------------ Testing 'echo' [OFF] --------------
...
...
@@ -35,6 +43,14 @@ echo:word
echo :word
echo word@space@
echo word@space@@space@
echo word
echo@tab@word
echo@tab@word @tab@
echo@tab@word@tab@@space@
@tab@echo word
echo @tab@word
echo @tab@word
echo@tab@@tab@word
echo ------------ Testing redirection operators --------------
mkdir foobar & cd foobar
...
...
@@ -140,6 +156,14 @@ set BAZ%=
echo set "FOO=bar" should not include the quotes in the variable value
set "FOO=bar"
echo %FOO%
set@tab@FOO=foo
echo %FOO%
set@tab@FOO=
echo '%FOO%'
set FOO=foo@space@
echo '%FOO%'
set FOO=foo@tab@
echo '%FOO%'
set FOO=
echo ------------ Testing variable expansion --------------
...
...
@@ -266,12 +290,18 @@ cd..@space@
cd
if not exist foobar (cd ..)
cd foobar
cd@tab@..@tab@@space@@tab@
cd
if not exist foobar (cd ..)
cd foobar
mkdir "bar bak"
cd "bar bak"
cd
cd ..
cd bar bak
cd
cd "bar bak@space@"@tab@@space@
cd
cd ..\..
cd
rd /Q/s foobar
...
...
@@ -282,7 +312,7 @@ echo bar> foobaz
type foobaz
echo ***
@echo off
type foobaz
type foobaz
@tab@
echo ***
del foobaz
...
...
@@ -296,7 +326,7 @@ dir /b /a-d
echo foo > nul
dir /b /a-d
echo foo > NuL
dir /b
/a-d
@tab@dir /b@tab@
/a-d
del bar
rem NUL not special everywhere
call :setError 123
...
...
@@ -351,6 +381,11 @@ for %%i in (A B C) do call :forTestFun1 %%i
for %%i in (1,4,1) do echo %%i
for %%i in (A, B,C) do echo %%i
for %%i in (X) do echo %%i
for@tab@%%i in (X2) do echo %%i
for %%i in@tab@(X3) do echo %%i
for %%i in (@tab@ foo@tab@) do echo %%i
for@tab@ %%i in@tab@(@tab@M) do echo %%i
for %%i@tab@in (X)@tab@do@tab@echo %%i
goto :endForTestFun1
:forTestFun1
echo %1
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
a91eceae
...
...
@@ -47,6 +47,30 @@ word@space@
@pwd@>echo word@space@@space@@space@
word@space@@space@
@todo_wine@@pwd@>echo word@space@
word
@pwd@>echo@tab@word@space@
@todo_wine@word
@pwd@>echo@tab@word@space@@tab@@space@
@todo_wine@word@space@@tab@
@pwd@>echo@tab@word@tab@@space@@space@
@todo_wine@word@tab@@space@
@todo_wine@@pwd@>echo word@space@
word
@pwd@>echo@space@@tab@word@space@
@tab@word
@pwd@>echo@space@@space@@tab@word@space@
@space@@tab@word
@pwd@>echo@tab@@tab@word@space@
@todo_wine@@tab@word
------------ Testing 'echo' [OFF] --------------
word
'singlequotedword'
...
...
@@ -63,6 +87,14 @@ word
:word
word@space@
word@space@@space@
word
@todo_wine@word
@todo_wine@word@space@@tab@
@todo_wine@word@tab@@space@
word
@tab@word
@space@@tab@word
@todo_wine@@tab@word
------------ Testing redirection operators --------------
...stdout redirection
foo
...
...
@@ -126,6 +158,10 @@ BAZ=bazbaz
bazbaz
set "FOO=bar" should not include the quotes in the variable value
bar
@todo_wine@foo
@todo_wine@''
'foo@space@'
'foo@tab@'
------------ Testing variable expansion --------------
~dp0 should be directory containing batch file
@pwd@\
...
...
@@ -189,6 +225,8 @@ Current dir: @pwd@\foobar@or_broken@Current dir:@space@
@pwd@\foobar
@pwd@
@todo_wine@@pwd@
@todo_wine@@pwd@
@pwd@\foobar\bar bak
@pwd@\foobar\bar bak
@pwd@\foobar\bar bak
@pwd@
...
...
@@ -237,6 +275,11 @@ A
B
C
X
@todo_wine@X2
@todo_wine@X3
foo
@todo_wine@M
@todo_wine@X
...imbricated FORs
@todo_wine@X Y
@todo_wine@X Y
...
...
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