cmd/tests: Add tests for variables substrings.

This commit is contained in:
Frédéric Delanoy 2011-08-25 14:22:29 +02:00 committed by Alexandre Julliard
parent 515dd2543e
commit 82cdeb6d4d
2 changed files with 23 additions and 0 deletions

View File

@ -214,6 +214,19 @@ echo P%ERRORLEVEL%
echo %ERRORLEVEL%S
echo P%ERRORLEVEL%S
echo ------------ Testing variable substrings --------------
set VAR=qwerty
echo %VAR:~0,1%
echo %VAR:~0,3%
echo %VAR:~2,2%
echo '%VAR:~-2,3%'
echo '%VAR:~-2,1%'
echo %VAR:~2,-1%
echo %VAR:~2,-3%
echo '%VAR:~-2,-4%'
echo %VAR:~-3,-2%
set VAR=
echo ------------ Testing variable delayed expansion --------------
rem NT4 doesn't support this
echo ...default mode (load-time expansion)

View File

@ -203,6 +203,16 @@ ERRORLEVEL
P0
0S
P0S
------------ Testing variable substrings --------------
q
qwe
er
@todo_wine@'ty'@or_broken@''
't'@or_broken@''
ert@or_broken@qwerty
e@or_broken@qwerty
''@or_broken@'qwerty'
r@or_broken@qwerty
------------ Testing variable delayed expansion --------------
...default mode (load-time expansion)
foo