Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
c5faceab
Commit
c5faceab
authored
12 years ago
by
Frédéric Delanoy
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cmd/tests: Add tests for mixed number/stringified numbers comparisons in "if" statements.
parent
5888ad35
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
programs/cmd/tests/test_builtins.cmd
+19
-0
19 additions, 0 deletions
programs/cmd/tests/test_builtins.cmd
programs/cmd/tests/test_builtins.cmd.exp
+17
-0
17 additions, 0 deletions
programs/cmd/tests/test_builtins.cmd.exp
with
36 additions
and
0 deletions
programs/cmd/tests/test_builtins.cmd
+
19
−
0
View file @
c5faceab
...
...
@@ -746,6 +746,25 @@ for %%i in (%INT_PARMS%) do call :GTRtest %%i 0
for
%%i
in
(
%INT_PARMS%
)
do
call
:GTRtest
%%i
1
for
%%i
in
(
%INT_PARMS%
)
do
call
:GTRtest
%%i
10
for
%%i
in
(
%INT_PARMS%
)
do
call
:GTRtest
%%i
9
echo
------
for
numbers
and
stringified
numbers
if
not
"1"
EQU
1
(
echo
strings
and
integers
not
equal
)
else
echo
foo
if
not
1
EQU
"1"
(
echo
strings
and
integers
not
equal
)
else
echo
foo
if
'1'
EQU
1
echo
'1'
EQU
1
if
1
EQU
'1'
echo
1
EQU
'1'
if
not
"1"
GEQ
1
(
echo
foo
)
else
echo
bar
if
"10"
GEQ
"1"
echo
"10"
GEQ
"1"
if
'1'
GEQ
1
(
echo
'1'
GEQ
1
)
else
echo
NT4
if
1
GEQ
"1"
echo
1
GEQ
"1"
if
"1"
GEQ
"1"
echo
"1"
GEQ
"1"
if
'1'
GEQ
"1"
echo
'1'
GEQ
"1"
if
"10"
GEQ
"1"
echo
"10"
GEQ
"1"
if
not
1
GEQ
'1'
(
echo
non
NT4
)
else
echo
1
GEQ
'1'
for
%%i
in
(
"1"
'1'
)
do
call
:GEQtest
%%i
'1'
if
"10"
GEQ
'1'
(
echo
"10"
GEQ
'1'
)
else
echo
foo
if
1
GEQ
"10"
(
echo
1
GEQ
"10"
)
else
echo
foo
if
"1"
GEQ
"10"
(
echo
1
GEQ
"10"
)
else
echo
foo
if
'1'
GEQ
"10"
(
echo
'1'
GEQ
"10"
)
else
echo
foo
if
"10"
GEQ
"10"
(
echo
"10"
GEQ
"10"
)
goto
:endIfCompOpsSubroutines
rem IF subroutines helpers
...
...
This diff is collapsed.
Click to expand it.
programs/cmd/tests/test_builtins.cmd.exp
+
17
−
0
View file @
c5faceab
...
...
@@ -592,6 +592,23 @@ also in negative form
@todo_wine@10 GTR 1
@todo_wine@9 GTR 1
@todo_wine@10 GTR 9
------ for numbers and stringified numbers
strings and integers not equal
strings and integers not equal
foo
@todo_wine@"10" GEQ "1"
@todo_wine@'1' GEQ 1@or_broken@NT4
@todo_wine@1 GEQ "1"
@todo_wine@"1" GEQ "1"
@todo_wine@'1' GEQ "1"
@todo_wine@"10" GEQ "1"
@todo_wine@non NT4@or_broken@1 GEQ '1'
@todo_wine@'1' GEQ '1'
@todo_wine@foo
@todo_wine@1 GEQ "10"
@todo_wine@foo
@todo_wine@'1' GEQ "10"
@todo_wine@"10" GEQ "10"
------------ Testing for ------------
--- plain FOR
A
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment