[6/7] cmd/tests: Add tests for GTR comparison operator in "if" statements

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


---
 programs/cmd/tests/test_builtins.cmd     | 12 ++++++++++++
 programs/cmd/tests/test_builtins.cmd.exp | 16 ++++++++++++++++
 2 files changed, 28 insertions(+)

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 at AB GEQ AA
 @todo_wine at BA GEQ AA
 @todo_wine at AA GEQ AA
+ at todo_wine@B GTR A
+ at todo_wine@AB GTR A
+ at todo_wine@BA GTR A
+ at todo_wine@AA GTR A
+ at todo_wine@BA GTR B
+ at todo_wine@B GTR AB
+ at todo_wine@BA GTR AB
+ at todo_wine@B GTR AA
+ at todo_wine@AB GTR AA
+ at todo_wine@BA GTR AA
 ------ for numbers
 negative numbers handled
 negative numbers handled
@@ -576,6 +586,12 @@ also in negative form
 @todo_wine at 10 GEQ 10
 @todo_wine at 10 GEQ 9
 @todo_wine at 9 GEQ 9
+ at todo_wine@1 GTR 0
+ at todo_wine@10 GTR 0
+ at todo_wine@9 GTR 0
+ at todo_wine@10 GTR 1
+ at todo_wine@9 GTR 1
+ at todo_wine@10 GTR 9
 ------------ Testing for ------------
 --- plain FOR
 A
-- 
1.7.11.3




More information about the wine-patches mailing list