https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7115d7ba8e907a0fec4bc881952ae610b219be2b

commit 7115d7ba8e907a0fec4bc881952ae610b219be2b
Author:     Hermès Bélusca-Maïto <[email protected]>
AuthorDate: Thu Jul 23 22:36:25 2020 +0200
Commit:     Hermès Bélusca-Maïto <[email protected]>
CommitDate: Wed Aug 19 20:35:53 2020 +0200

    [CMD_WINETEST] Sync with Wine 5.12.
---
 modules/rostests/winetests/cmd/test_builtins.cmd   | 37 +++++++++++++++++++++-
 .../rostests/winetests/cmd/test_builtins.cmd.exp   | 20 ++++++++++++
 modules/rostests/winetests/cmd/test_cmdline.cmd    | 19 +++++++----
 .../rostests/winetests/cmd/test_cmdline.cmd.exp    | 12 +++++--
 4 files changed, 79 insertions(+), 9 deletions(-)

diff --git a/modules/rostests/winetests/cmd/test_builtins.cmd 
b/modules/rostests/winetests/cmd/test_builtins.cmd
index f4dfc9f26d8..73b0917c275 100644
--- a/modules/rostests/winetests/cmd/test_builtins.cmd
+++ b/modules/rostests/winetests/cmd/test_builtins.cmd
@@ -875,7 +875,15 @@ type ."\foobaz"
 echo ---2
 type ".\foobaz"
 echo ---3
-del foobaz
+echo foo> foobay
+echo ---4
+type foobaz foobay > foobax 2> foobaw
+echo ---5
+type foobax
+echo ---6
+type foobaw
+echo ---7
+del foobaz foobay foobax foobaw
 
 echo ------------ Testing NUL ------------
 md foobar & cd foobar
@@ -985,6 +993,33 @@ if "x" == "a" (
   if "y" == "b" echo broken2
   echo expected post-embedded if
 )
+if ()==() (
+  echo comparison operators surrounded by brackets seem to work
+) else (
+  echo comparison operators surrounded by brackets seem to be broken
+)
+if 1(==1( (
+  echo comparison operators surrounded by brackets seem to work
+) else (
+  echo comparison operators surrounded by brackets seem to be broken
+)
+if )==) (
+  echo comparison operators surrounded by brackets seem to work
+) else (
+  echo comparison operators surrounded by brackets seem to be broken
+)
+if /i not (a)==(b) (
+  echo comparison operators surrounded by brackets seem to work
+) else (
+  echo comparison operators surrounded by brackets seem to be broken
+)
+if defined windir echo windir is defined
+if not defined windir echo windir is defined
+if not exist %windir% (
+  echo windir does not exist
+) else (
+  echo windir does exist
+)
 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
diff --git a/modules/rostests/winetests/cmd/test_builtins.cmd.exp 
b/modules/rostests/winetests/cmd/test_builtins.cmd.exp
index d78d91a6cff..fb84de2f5d5 100644
--- a/modules/rostests/winetests/cmd/test_builtins.cmd.exp
+++ b/modules/rostests/winetests/cmd/test_builtins.cmd.exp
@@ -659,6 +659,20 @@ bar
 ---2
 bar
 ---3
+---4
+---5
+bar
+foo
+---6
+
+foobaz
+
+
+
+foobay
+
+
+---7
 ------------ Testing NUL ------------
 bar
 bar
@@ -681,6 +695,12 @@ else if seems to work
 else if seems to work
 expected1
 expected post-embedded if
+comparison operators surrounded by brackets seem to work
+comparison operators surrounded by brackets seem to work
+comparison operators surrounded by brackets seem to work
+comparison operators surrounded by brackets seem to work
+windir is defined
+windir does exist
 --- case sensitivity with and without /i option
 if seems to default to case sensitivity
 if /i seems to work
diff --git a/modules/rostests/winetests/cmd/test_cmdline.cmd 
b/modules/rostests/winetests/cmd/test_cmdline.cmd
index 32a1ef2e48f..7a7f8d7b632 100644
--- a/modules/rostests/winetests/cmd/test_cmdline.cmd
+++ b/modules/rostests/winetests/cmd/test_cmdline.cmd
@@ -183,12 +183,19 @@ echo ------- Testing CMD /C qualifier treatment 
------------
 rem no need for space after /c
 cmd /csay one
 cmd /c"say one"
-rem ignore quote before qualifier
-rem FIXME the next command in wine starts a sub-CMD
-echo THIS FAILS: cmd "/c"say one
-rem ignore anything before /c
-rem FIXME the next command in wine starts a sub-CMD
-echo THIS FAILS: cmd ignoreme/c say one
+cmd /c"say one
+cmd /c=say one
+cmd /c,say one
+cmd /c;say one
+rem non-options are ignored before /c; quotes are not treated specially
+cmd "/c"say one
+cmd ignoreme/c say one
+cmd abc "def ghi/c say one"
+cmd -\@$*'"/c say one
+echo echo bar > foo.bat
+cmd /qq/c foo
+cmd /q "xyz /c foo"
+del foo.bat
 
 echo --------- Testing special characters --------------
 echo @echo amp > "say&.bat"
diff --git a/modules/rostests/winetests/cmd/test_cmdline.cmd.exp 
b/modules/rostests/winetests/cmd/test_cmdline.cmd.exp
index 980f67411cb..7978a249c97 100644
--- a/modules/rostests/winetests/cmd/test_cmdline.cmd.exp
+++ b/modules/rostests/winetests/cmd/test_cmdline.cmd.exp
@@ -90,8 +90,16 @@ Passed
 ------- Testing CMD /C qualifier treatment ------------
 0@space@
 1@space@
-THIS FAILS: cmd "/c"say one
-THIS FAILS: cmd ignoreme/c say one
+0@space@
+0@space@
+0@space@
+0@space@
+0@space@
+0@space@
+0@space@
+0@space@
+bar@space@
+bar@space@
 --------- Testing special characters --------------
 0@space@
 0@space@

Reply via email to