[2/7] cmd/tests: Add tests for LEQ comparison operator in "if" statements

Frédéric Delanoy frederic.delanoy at gmail.com
Mon Oct 22 20:10:24 CDT 2012


---
 programs/cmd/tests/test_builtins.cmd     | 20 ++++++++++++++++++++
 programs/cmd/tests/test_builtins.cmd.exp | 31 +++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

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 at a LSS B insensitive
 @todo_wine at A LSS b
 @todo_wine at A LSS b insensitive
+ at todo_wine@A LEQ A
+ at todo_wine@A LEQ B
+ at todo_wine@B LEQ B
+ at todo_wine@AB LEQ B
+ at todo_wine@AA LEQ B
+ at todo_wine@A LEQ AB
+ at todo_wine@AB LEQ AB
+ at todo_wine@AA LEQ AB
+ at todo_wine@A LEQ BA
+ at todo_wine@B LEQ BA
+ at todo_wine@AB LEQ BA
+ at todo_wine@BA LEQ BA
+ at todo_wine@AA LEQ BA
+ at todo_wine@A LEQ AA
+ at todo_wine@AA LEQ AA
+ at todo_wine@b LEQ B at or_broken@NT4
+ at todo_wine@b LEQ B insensitive
+ at todo_wine@a LEQ B at or_broken@NT4
+ at todo_wine@a LEQ B insensitive
+ at todo_wine@A LEQ b
+ at todo_wine@A LEQ b insensitive
 ------ for numbers
 negative numbers handled
 negative numbers handled
@@ -474,6 +495,16 @@ also in negative form
 @todo_wine at 9 LSS 10
 @todo_wine at 0 LSS 9
 @todo_wine at 1 LSS 9
+ at todo_wine@0 LEQ 0
+ at todo_wine@0 LEQ 1
+ at todo_wine@1 LEQ 1
+ at todo_wine@0 LEQ 10
+ at todo_wine@1 LEQ 10
+ at todo_wine@10 LEQ 10
+ at todo_wine@9 LEQ 10
+ at todo_wine@0 LEQ 9
+ at todo_wine@1 LEQ 9
+ at todo_wine@9 LEQ 9
 ------------ Testing for ------------
 --- plain FOR
 A
-- 
1.7.11.3




More information about the wine-patches mailing list