Module: wine
Branch: master
Commit: 5888ad35377d30683a30723e3975835474527a63
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5888ad35377d30683a30723e3…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com>
Date: Tue Oct 23 03:10:28 2012 +0200
cmd/tests: Add tests for GTR comparison operator in "if" statements.
---
programs/cmd/tests/test_builtins.cmd | 12 ++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 16 ++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index b7e72ec..4256056 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -704,6 +704,11 @@ for %%i in (%STR_PARMS%) do call :GEQtest %%i B
for %%i in (%STR_PARMS%) do call :GEQtest %%i AB
for %%i in (%STR_PARMS%) do call :GEQtest %%i BA
for %%i in (%STR_PARMS%) do call :GEQtest %%i AA
+for %%i in (%STR_PARMS%) do call :GTRtest %%i A
+for %%i in (%STR_PARMS%) do call :GTRtest %%i B
+for %%i in (%STR_PARMS%) do call :GTRtest %%i AB
+for %%i in (%STR_PARMS%) do call :GTRtest %%i BA
+for %%i in (%STR_PARMS%) do call :GTRtest %%i AA
echo ------ for numbers
if -1 LSS 1 (echo negative numbers handled)
if not -1 LSS -10 (echo negative numbers handled)
@@ -737,6 +742,10 @@ for %%i in (%INT_PARMS%) do call :GEQtest %%i 0
for %%i in (%INT_PARMS%) do call :GEQtest %%i 1
for %%i in (%INT_PARMS%) do call :GEQtest %%i 10
for %%i in (%INT_PARMS%) do call :GEQtest %%i 9
+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
goto :endIfCompOpsSubroutines
rem IF subroutines helpers
@@ -755,6 +764,9 @@ goto :eof
:GEQtest
if %1 GEQ %2 echo %1 GEQ %2
goto :eof
+:GTRtest
+if %1 GTR %2 echo %1 GTR %2
+goto :eof
:endIfCompOpsSubroutines
set STR_PARMS=
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 81686ff..6c1825e 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -522,6 +522,16 @@ LSS string can be used as operand for LSS comparison
@todo_wine@AB GEQ AA
@todo_wine@BA GEQ AA
@todo_wine@AA GEQ AA
+@todo_wine@B GTR A
+@todo_wine@AB GTR A
+@todo_wine@BA GTR A
+@todo_wine@AA GTR A
+@todo_wine@BA GTR B
+@todo_wine@B GTR AB
+@todo_wine@BA GTR AB
+@todo_wine@B GTR AA
+@todo_wine@AB GTR AA
+@todo_wine@BA GTR AA
------ for numbers
negative numbers handled
negative numbers handled
@@ -576,6 +586,12 @@ also in negative form
@todo_wine@10 GEQ 10
@todo_wine@10 GEQ 9
@todo_wine@9 GEQ 9
+@todo_wine@1 GTR 0
+@todo_wine@10 GTR 0
+@todo_wine@9 GTR 0
+@todo_wine@10 GTR 1
+@todo_wine@9 GTR 1
+@todo_wine@10 GTR 9
------------ Testing for ------------
--- plain FOR
A
Module: wine
Branch: master
Commit: 43f5471cbaadc4655a363da351712e24b88eb94e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=43f5471cbaadc4655a363da35…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com>
Date: Tue Oct 23 03:10:27 2012 +0200
cmd/tests: Add tests for GEQ comparison operator in "if" statements.
---
programs/cmd/tests/test_builtins.cmd | 12 ++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 25 +++++++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index e940b2d..b7e72ec 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -699,6 +699,11 @@ for %%i in (%STR_PARMS%) do call :NEQtest %%i B
for %%i in (%STR_PARMS%) do call :NEQtest %%i AB
for %%i in (%STR_PARMS%) do call :NEQtest %%i BA
for %%i in (%STR_PARMS%) do call :NEQtest %%i AA
+for %%i in (%STR_PARMS%) do call :GEQtest %%i A
+for %%i in (%STR_PARMS%) do call :GEQtest %%i B
+for %%i in (%STR_PARMS%) do call :GEQtest %%i AB
+for %%i in (%STR_PARMS%) do call :GEQtest %%i BA
+for %%i in (%STR_PARMS%) do call :GEQtest %%i AA
echo ------ for numbers
if -1 LSS 1 (echo negative numbers handled)
if not -1 LSS -10 (echo negative numbers handled)
@@ -728,6 +733,10 @@ for %%i in (%INT_PARMS%) do call :NEQtest %%i 0
for %%i in (%INT_PARMS%) do call :NEQtest %%i 1
for %%i in (%INT_PARMS%) do call :NEQtest %%i 10
for %%i in (%INT_PARMS%) do call :NEQtest %%i 9
+for %%i in (%INT_PARMS%) do call :GEQtest %%i 0
+for %%i in (%INT_PARMS%) do call :GEQtest %%i 1
+for %%i in (%INT_PARMS%) do call :GEQtest %%i 10
+for %%i in (%INT_PARMS%) do call :GEQtest %%i 9
goto :endIfCompOpsSubroutines
rem IF subroutines helpers
@@ -743,6 +752,9 @@ goto :eof
:NEQtest
if %1 NEQ %2 echo %1 NEQ %2
goto :eof
+:GEQtest
+if %1 GEQ %2 echo %1 GEQ %2
+goto :eof
:endIfCompOpsSubroutines
set STR_PARMS=
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index c04c775..81686ff 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -507,6 +507,21 @@ LSS string can be used as operand for LSS comparison
@todo_wine@B NEQ AA
@todo_wine@AB NEQ AA
@todo_wine@BA NEQ AA
+@todo_wine@A GEQ A
+@todo_wine@B GEQ A
+@todo_wine@AB GEQ A
+@todo_wine@BA GEQ A
+@todo_wine@AA GEQ A
+@todo_wine@B GEQ B
+@todo_wine@BA GEQ B
+@todo_wine@B GEQ AB
+@todo_wine@AB GEQ AB
+@todo_wine@BA GEQ AB
+@todo_wine@BA GEQ BA
+@todo_wine@B GEQ AA
+@todo_wine@AB GEQ AA
+@todo_wine@BA GEQ AA
+@todo_wine@AA GEQ AA
------ for numbers
negative numbers handled
negative numbers handled
@@ -551,6 +566,16 @@ also in negative form
@todo_wine@0 NEQ 9
@todo_wine@1 NEQ 9
@todo_wine@10 NEQ 9
+@todo_wine@0 GEQ 0
+@todo_wine@1 GEQ 0
+@todo_wine@10 GEQ 0
+@todo_wine@9 GEQ 0
+@todo_wine@1 GEQ 1
+@todo_wine@10 GEQ 1
+@todo_wine@9 GEQ 1
+@todo_wine@10 GEQ 10
+@todo_wine@10 GEQ 9
+@todo_wine@9 GEQ 9
------------ Testing for ------------
--- plain FOR
A
Module: wine
Branch: master
Commit: 8e3227c82486d85ad248c5dccb84cde9e464dc6a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8e3227c82486d85ad248c5dcc…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com>
Date: Tue Oct 23 03:10:26 2012 +0200
cmd/tests: Add tests for NEQ comparison operator in "if" statements.
---
programs/cmd/tests/test_builtins.cmd | 12 +++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 32 ++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 7c83393..e940b2d 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -694,6 +694,11 @@ for %%i in (%STR_PARMS%) do call :EQUtest %%i AB
for %%i in (%STR_PARMS%) do call :EQUtest %%i BA
for %%i in (%STR_PARMS%) do call :EQUtest %%i AA
if /I A EQU a echo A EQU a insensitive
+for %%i in (%STR_PARMS%) do call :NEQtest %%i A
+for %%i in (%STR_PARMS%) do call :NEQtest %%i B
+for %%i in (%STR_PARMS%) do call :NEQtest %%i AB
+for %%i in (%STR_PARMS%) do call :NEQtest %%i BA
+for %%i in (%STR_PARMS%) do call :NEQtest %%i AA
echo ------ for numbers
if -1 LSS 1 (echo negative numbers handled)
if not -1 LSS -10 (echo negative numbers handled)
@@ -719,6 +724,10 @@ if 011 EQU 9 (echo octal ok)
if 0xA1 EQU 161 (echo hexa ok)
if 0xA1 EQU "161" (echo hexa should be be recognized) else (echo string/hexa compare ok)
if "0xA1" EQU 161 (echo hexa should be be recognized) else (echo string/hexa compare ok)
+for %%i in (%INT_PARMS%) do call :NEQtest %%i 0
+for %%i in (%INT_PARMS%) do call :NEQtest %%i 1
+for %%i in (%INT_PARMS%) do call :NEQtest %%i 10
+for %%i in (%INT_PARMS%) do call :NEQtest %%i 9
goto :endIfCompOpsSubroutines
rem IF subroutines helpers
@@ -731,6 +740,9 @@ goto :eof
:EQUtest
if %1 EQU %2 echo %1 EQU %2
goto :eof
+:NEQtest
+if %1 NEQ %2 echo %1 NEQ %2
+goto :eof
:endIfCompOpsSubroutines
set STR_PARMS=
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 91ad55b..c04c775 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -487,6 +487,26 @@ LSS string can be used as operand for LSS comparison
@todo_wine@BA EQU BA
@todo_wine@AA EQU AA
@todo_wine@A EQU a insensitive
+@todo_wine@B NEQ A
+@todo_wine@AB NEQ A
+@todo_wine@BA NEQ A
+@todo_wine@AA NEQ A
+@todo_wine@A NEQ B
+@todo_wine@AB NEQ B
+@todo_wine@BA NEQ B
+@todo_wine@AA NEQ B
+@todo_wine@A NEQ AB
+@todo_wine@B NEQ AB
+@todo_wine@BA NEQ AB
+@todo_wine@AA NEQ AB
+@todo_wine@A NEQ BA
+@todo_wine@B NEQ BA
+@todo_wine@AB NEQ BA
+@todo_wine@AA NEQ BA
+@todo_wine@A NEQ AA
+@todo_wine@B NEQ AA
+@todo_wine@AB NEQ AA
+@todo_wine@BA NEQ AA
------ for numbers
negative numbers handled
negative numbers handled
@@ -519,6 +539,18 @@ also in negative form
@todo_wine@hexa ok
@todo_wine@string/hexa compare ok
@todo_wine@string/hexa compare ok
+@todo_wine@1 NEQ 0
+@todo_wine@10 NEQ 0
+@todo_wine@9 NEQ 0
+@todo_wine@0 NEQ 1
+@todo_wine@10 NEQ 1
+@todo_wine@9 NEQ 1
+@todo_wine@0 NEQ 10
+@todo_wine@1 NEQ 10
+@todo_wine@9 NEQ 10
+@todo_wine@0 NEQ 9
+@todo_wine@1 NEQ 9
+@todo_wine@10 NEQ 9
------------ Testing for ------------
--- plain FOR
A
Module: wine
Branch: master
Commit: a0a61cb59200c9147be700f6051d0365640dec01
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a0a61cb59200c9147be700f60…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com>
Date: Tue Oct 23 03:10:25 2012 +0200
cmd/tests: Add tests for EQU comparison operator in "if" statements.
---
programs/cmd/tests/test_builtins.cmd | 17 +++++++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 14 ++++++++++++++
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 28721c1..7c83393 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -688,6 +688,12 @@ if a LEQ B (echo a LEQ B) else echo NT4
if /I a LEQ B echo a LEQ B insensitive
if A LEQ b echo A LEQ b
if /I A LEQ b echo A LEQ b insensitive
+for %%i in (%STR_PARMS%) do call :EQUtest %%i A
+for %%i in (%STR_PARMS%) do call :EQUtest %%i B
+for %%i in (%STR_PARMS%) do call :EQUtest %%i AB
+for %%i in (%STR_PARMS%) do call :EQUtest %%i BA
+for %%i in (%STR_PARMS%) do call :EQUtest %%i AA
+if /I A EQU a echo A EQU a insensitive
echo ------ for numbers
if -1 LSS 1 (echo negative numbers handled)
if not -1 LSS -10 (echo negative numbers handled)
@@ -705,6 +711,14 @@ for %%i in (%INT_PARMS%) do call :LEQtest %%i 0
for %%i in (%INT_PARMS%) do call :LEQtest %%i 1
for %%i in (%INT_PARMS%) do call :LEQtest %%i 10
for %%i in (%INT_PARMS%) do call :LEQtest %%i 9
+for %%i in (%INT_PARMS%) do call :EQUtest %%i 0
+for %%i in (%INT_PARMS%) do call :EQUtest %%i 1
+for %%i in (%INT_PARMS%) do call :EQUtest %%i 10
+for %%i in (%INT_PARMS%) do call :EQUtest %%i 9
+if 011 EQU 9 (echo octal ok)
+if 0xA1 EQU 161 (echo hexa ok)
+if 0xA1 EQU "161" (echo hexa should be be recognized) else (echo string/hexa compare ok)
+if "0xA1" EQU 161 (echo hexa should be be recognized) else (echo string/hexa compare ok)
goto :endIfCompOpsSubroutines
rem IF subroutines helpers
@@ -714,6 +728,9 @@ goto :eof
:LEQtest
if %1 LEQ %2 echo %1 LEQ %2
goto :eof
+:EQUtest
+if %1 EQU %2 echo %1 EQU %2
+goto :eof
:endIfCompOpsSubroutines
set STR_PARMS=
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 53eaffd..91ad55b 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -481,6 +481,12 @@ LSS string can be used as operand for LSS comparison
@todo_wine@a LEQ B insensitive
@todo_wine@A LEQ b
@todo_wine@A LEQ b insensitive
+@todo_wine@A EQU A
+@todo_wine@B EQU B
+@todo_wine@AB EQU AB
+@todo_wine@BA EQU BA
+@todo_wine@AA EQU AA
+@todo_wine@A EQU a insensitive
------ for numbers
negative numbers handled
negative numbers handled
@@ -505,6 +511,14 @@ also in negative form
@todo_wine@0 LEQ 9
@todo_wine@1 LEQ 9
@todo_wine@9 LEQ 9
+@todo_wine@0 EQU 0
+@todo_wine@1 EQU 1
+@todo_wine@10 EQU 10
+@todo_wine@9 EQU 9
+@todo_wine@octal ok
+@todo_wine@hexa ok
+@todo_wine@string/hexa compare ok
+@todo_wine@string/hexa compare ok
------------ Testing for ------------
--- plain FOR
A
Module: wine
Branch: master
Commit: ac52924d44425d1cc13b1ff255550c43674f6aa2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ac52924d44425d1cc13b1ff25…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com>
Date: Tue Oct 23 03:10:24 2012 +0200
cmd/tests: Add tests for LEQ comparison operator in "if" statements.
---
programs/cmd/tests/test_builtins.cmd | 20 +++++++++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 31 ++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 5039484..28721c1 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -675,6 +675,19 @@ if a LSS B (echo a LSS B) else echo NT4
if /I a LSS B echo a LSS B insensitive
if A LSS b echo A LSS b
if /I A LSS b echo A LSS b insensitive
+for %%i in (%STR_PARMS%) do call :LEQtest %%i A
+for %%i in (%STR_PARMS%) do call :LEQtest %%i B
+for %%i in (%STR_PARMS%) do call :LEQtest %%i AB
+for %%i in (%STR_PARMS%) do call :LEQtest %%i BA
+for %%i in (%STR_PARMS%) do call :LEQtest %%i AA
+if b LEQ B (echo b LEQ B) else echo NT4
+if /I b LEQ B echo b LEQ B insensitive
+if b LEQ A echo b LEQ A
+if /I b LEQ A echo b LEQ A insensitive
+if a LEQ B (echo a LEQ B) else echo NT4
+if /I a LEQ B echo a LEQ B insensitive
+if A LEQ b echo A LEQ b
+if /I A LEQ b echo A LEQ b insensitive
echo ------ for numbers
if -1 LSS 1 (echo negative numbers handled)
if not -1 LSS -10 (echo negative numbers handled)
@@ -688,12 +701,19 @@ for %%i in (%INT_PARMS%) do call :LSStest %%i 0
for %%i in (%INT_PARMS%) do call :LSStest %%i 1
for %%i in (%INT_PARMS%) do call :LSStest %%i 10
for %%i in (%INT_PARMS%) do call :LSStest %%i 9
+for %%i in (%INT_PARMS%) do call :LEQtest %%i 0
+for %%i in (%INT_PARMS%) do call :LEQtest %%i 1
+for %%i in (%INT_PARMS%) do call :LEQtest %%i 10
+for %%i in (%INT_PARMS%) do call :LEQtest %%i 9
goto :endIfCompOpsSubroutines
rem IF subroutines helpers
:LSStest
if %1 LSS %2 echo %1 LSS %2
goto :eof
+:LEQtest
+if %1 LEQ %2 echo %1 LEQ %2
+goto :eof
:endIfCompOpsSubroutines
set STR_PARMS=
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 04e2927..53eaffd 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -460,6 +460,27 @@ LSS string can be used as operand for LSS comparison
@todo_wine@a LSS B insensitive
@todo_wine@A LSS b
@todo_wine@A LSS b insensitive
+@todo_wine@A LEQ A
+@todo_wine@A LEQ B
+@todo_wine@B LEQ B
+@todo_wine@AB LEQ B
+@todo_wine@AA LEQ B
+@todo_wine@A LEQ AB
+@todo_wine@AB LEQ AB
+@todo_wine@AA LEQ AB
+@todo_wine@A LEQ BA
+@todo_wine@B LEQ BA
+@todo_wine@AB LEQ BA
+@todo_wine@BA LEQ BA
+@todo_wine@AA LEQ BA
+@todo_wine@A LEQ AA
+@todo_wine@AA LEQ AA
+@todo_wine@b LEQ B@or_broken@NT4
+@todo_wine@b LEQ B insensitive
+@todo_wine@a LEQ B@or_broken@NT4
+@todo_wine@a LEQ B insensitive
+@todo_wine@A LEQ b
+@todo_wine@A LEQ b insensitive
------ for numbers
negative numbers handled
negative numbers handled
@@ -474,6 +495,16 @@ also in negative form
@todo_wine@9 LSS 10
@todo_wine@0 LSS 9
@todo_wine@1 LSS 9
+@todo_wine@0 LEQ 0
+@todo_wine@0 LEQ 1
+@todo_wine@1 LEQ 1
+@todo_wine@0 LEQ 10
+@todo_wine@1 LEQ 10
+@todo_wine@10 LEQ 10
+@todo_wine@9 LEQ 10
+@todo_wine@0 LEQ 9
+@todo_wine@1 LEQ 9
+@todo_wine@9 LEQ 9
------------ Testing for ------------
--- plain FOR
A
Module: wine
Branch: master
Commit: e3b5b6fd14d4cfa4d83b62c82dfa07b53d6a24ea
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e3b5b6fd14d4cfa4d83b62c82…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com>
Date: Tue Oct 23 03:10:23 2012 +0200
cmd/tests: Add tests for LSS comparison operator in "if" statements.
---
programs/cmd/tests/test_builtins.cmd | 63 ++++++++++++++++++++++++++++--
programs/cmd/tests/test_builtins.cmd.exp | 44 +++++++++++++++++++--
2 files changed, 99 insertions(+), 8 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index fff067c..5039484 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -607,7 +607,7 @@ if exist foo (
cd .. & rd foobar
echo ------------ Testing if/else ------------
-echo if/else should work with blocks
+echo --- if/else should work with blocks
if 0 == 0 (
echo if seems to work
) else (
@@ -623,19 +623,22 @@ if /c==/c (
) else (
echo parameter detection seems to be broken
)
-echo Testing case sensitivity with and without /i option
+
+echo --- case sensitivity with and without /i option
if bar==BAR echo if does not default to case sensitivity
if not bar==BAR echo if seems to default to case sensitivity
if /i foo==FOO echo if /i seems to work
if /i not foo==FOO echo if /i seems to be broken
if /I foo==FOO echo if /I seems to work
if /I not foo==FOO echo if /I seems to be broken
-echo Testing string comparisons
+
+echo --- string comparisons
if abc == abc (echo equal) else echo non equal
if abc =="abc" (echo equal) else echo non equal
if "abc"== abc (echo equal) else echo non equal
if "abc"== "abc" (echo equal) else echo non equal
-echo Testing tabs handling
+
+echo --- tabs handling
if@tab@1==1 echo doom
if @tab@1==1 echo doom
if 1==1 (echo doom) else@tab@echo quake
@@ -644,6 +647,58 @@ if 1==0@tab@(echo doom) else echo quake
if 1==0 (echo doom)@tab@else echo quake
if 1==0 (echo doom) else@tab@echo quake
+echo --- comparison operators
+rem NT4 misevaluates conditionals in for loops so we have to use subroutines as workarounds
+rem Imbricated for loops parameters are currently not expanded correctly; this prevents usage of simpler imbricated for loops in tests
+echo ------ for strings
+rem NT4 stops processing of the whole batch file as soon as it finds a
+rem comparison operator non fully uppercased, such as lss instead of LSS, so we
+rem can't test those here.
+if LSS LSS LSSfoo (echo LSS string can be used as operand for LSS comparison)
+if LSS LSS LSS (echo bar)
+if 1.1 LSS 1.10 (echo floats are handled as strings)
+if "9" LSS "10" (echo numbers in quotes recognized!) else echo numbers in quotes are handled as strings
+if not "-1" LSS "1" (echo negative numbers as well) else echo NT4
+if /i foo LSS FoOc echo if /i seems to work for LSS
+if /I not foo LSS FOOb echo if /I seems to be broken for LSS
+set STR_PARMS=A B AB BA AA
+for %%i in (%STR_PARMS%) do call :LSStest %%i A
+for %%i in (%STR_PARMS%) do call :LSStest %%i B
+for %%i in (%STR_PARMS%) do call :LSStest %%i AB
+for %%i in (%STR_PARMS%) do call :LSStest %%i BA
+for %%i in (%STR_PARMS%) do call :LSStest %%i AA
+if b LSS B (echo b LSS B) else echo NT4
+if /I b LSS B echo b LSS B insensitive
+if b LSS A echo b LSS A
+if /I b LSS A echo b LSS A insensitive
+if a LSS B (echo a LSS B) else echo NT4
+if /I a LSS B echo a LSS B insensitive
+if A LSS b echo A LSS b
+if /I A LSS b echo A LSS b insensitive
+echo ------ for numbers
+if -1 LSS 1 (echo negative numbers handled)
+if not -1 LSS -10 (echo negative numbers handled)
+if not 9 LSS 010 (echo octal handled)
+if not -010 LSS -8 (echo also in negative form)
+if 4 LSS 0x5 (echo hexa handled)
+if not -1 LSS -0x1A (echo also in negative form)
+if 11 LSS 101 (echo 11 LSS 101)
+set INT_PARMS=0 1 10 9
+for %%i in (%INT_PARMS%) do call :LSStest %%i 0
+for %%i in (%INT_PARMS%) do call :LSStest %%i 1
+for %%i in (%INT_PARMS%) do call :LSStest %%i 10
+for %%i in (%INT_PARMS%) do call :LSStest %%i 9
+goto :endIfCompOpsSubroutines
+
+rem IF subroutines helpers
+:LSStest
+if %1 LSS %2 echo %1 LSS %2
+goto :eof
+
+:endIfCompOpsSubroutines
+set STR_PARMS=
+set INT_PARMS=
+
echo ------------ Testing for ------------
echo --- plain FOR
for %%i in (A B C) do echo %%i
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index b7e8397..04e2927 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -417,20 +417,20 @@ bar
NUL
@todo_wine@foo created
------------ Testing if/else ------------
-if/else should work with blocks
+--- if/else should work with blocks
if seems to work
else seems to work
if seems not to detect /c as parameter
-Testing case sensitivity with and without /i option
+--- case sensitivity with and without /i option
if seems to default to case sensitivity
if /i seems to work
if /I seems to work
-Testing string comparisons
+--- string comparisons
equal
non equal
non equal
equal
-Testing tabs handling
+--- tabs handling
doom
doom
doom
@@ -438,6 +438,42 @@ lol
quake
quake
quake
+--- comparison operators
+------ for strings
+LSS string can be used as operand for LSS comparison
+@todo_wine@floats are handled as strings
+@todo_wine@numbers in quotes are handled as strings
+@todo_wine@negative numbers as well@or_broken@NT4
+@todo_wine@if /i seems to work for LSS
+@todo_wine@A LSS B
+@todo_wine@AB LSS B
+@todo_wine@AA LSS B
+@todo_wine@A LSS AB
+@todo_wine@AA LSS AB
+@todo_wine@A LSS BA
+@todo_wine@B LSS BA
+@todo_wine@AB LSS BA
+@todo_wine@AA LSS BA
+@todo_wine@A LSS AA
+@todo_wine@b LSS B@or_broken@NT4
+@todo_wine@a LSS B@or_broken@NT4
+@todo_wine@a LSS B insensitive
+@todo_wine@A LSS b
+@todo_wine@A LSS b insensitive
+------ for numbers
+negative numbers handled
+negative numbers handled
+octal handled
+also in negative form
+hexa handled
+also in negative form
+11 LSS 101
+@todo_wine@0 LSS 1
+@todo_wine@0 LSS 10
+@todo_wine@1 LSS 10
+@todo_wine@9 LSS 10
+@todo_wine@0 LSS 9
+@todo_wine@1 LSS 9
------------ Testing for ------------
--- plain FOR
A