From: Jason Edmeades us@edmeades.me.uk
--- programs/cmd/tests/test_builtins.cmd | 17 +++++++++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 6 ++++++ 2 files changed, 23 insertions(+)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 6f9e084ae35..e4e4d1b37df 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -2985,6 +2985,17 @@ echo echo +++>> tmp.cmd echo ftype footype>> tmp.cmd cmd /c tmp.cmd
+echo --- testing association +echo dummy>test.foo +ftype footype=cmd.exe /c "echo '%%1'" +test.foo +ftype footype=cmd.exe /c "echo '%%*'" +test.foo one two three +del test.foo +copy C:\windows\system32\cmd.exe test.foo >nul 2>&1 +test.foo /c "echo foobar" +del test.foo + echo --- resetting association assoc .foo=
@@ -3016,6 +3027,12 @@ echo .foo=footype echo footype=foo_opencmd echo +++ echo footype=foo_opencmd +echo --- testing association +echo footype=cmd.exe /c "echo '%%1'" +echo Skipped as not enough permissions +echo footype=cmd.exe /c "echo '%%*'" +echo Skipped as not enough permissions +echo Skipped as not enough permissions echo --- resetting association echo original value
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 8f4c18ee86b..aa3f6af3a60 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -1764,6 +1764,12 @@ footype=foo_opencmd footype=foo_opencmd +++ footype=foo_opencmd +--- testing association +footype=cmd.exe /c "echo '%1'" +'@drive@@path@foobar\test.foo'@or_broken@Skipped as not enough permissions +footype=cmd.exe /c "echo '%*'" +@todo_wine@' one two three'@or_broken@Skipped as not enough permissions +foobar@or_broken@Skipped as not enough permissions --- resetting association @todo_wine@original value@or_broken@buggyXP@or_broken@!WINE_FOO! ------------ Testing CALL ------------
From: Elizabeth Figura zfigura@codeweavers.com
--- programs/cmd/builtins.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index b31669b246c..832e9eeb797 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -3990,14 +3990,22 @@ RETURN_CODE WCMD_assoc(const WCHAR *args, BOOL assoc) lstrcpyW(subkey, args); if (!assoc) lstrcatW(subkey, L"\Shell\Open\Command");
- /* If nothing after '=' then clear value - only valid for ASSOC */ if (*newValue == 0x00) {
- if (assoc) rc = RegDeleteKeyW(key, args); - if (assoc && rc == ERROR_SUCCESS) { + if (assoc) + rc = RegDeleteKeyW(key, args); + else { + rc = RegCreateKeyExW(key, subkey, 0, NULL, REG_OPTION_NON_VOLATILE, + accessOptions, NULL, &readKey, NULL); + if (rc == ERROR_SUCCESS) { + rc = RegDeleteValueW(readKey, NULL); + RegCloseKey(readKey); + } + } + if (rc == ERROR_SUCCESS) { WINE_TRACE("HKCR Key '%s' deleted\n", wine_dbgstr_w(args));
- } else if (assoc && rc != ERROR_FILE_NOT_FOUND) { + } else if (rc != ERROR_FILE_NOT_FOUND) { WCMD_print_error(); errorlevel = ERROR_FILE_NOT_FOUND;
From: Elizabeth Figura zfigura@codeweavers.com
--- programs/cmd/builtins.c | 12 +++++------- programs/cmd/tests/test_builtins.cmd.exp | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 832e9eeb797..5a7ad82f783 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -3953,17 +3953,15 @@ RETURN_CODE WCMD_assoc(const WCHAR *args, BOOL assoc) lstrcpyW(subkey, keyValue); if (!assoc) lstrcatW(subkey, L"\Shell\Open\Command");
- if (RegOpenKeyExW(key, subkey, 0, accessOptions, &readKey) == ERROR_SUCCESS) { - - valueLen = sizeof(keyValue); - rc = RegQueryValueExW(readKey, NULL, NULL, NULL, (LPBYTE)keyValue, &valueLen); + valueLen = sizeof(keyValue); + if (RegOpenKeyExW(key, subkey, 0, accessOptions, &readKey) == ERROR_SUCCESS && + RegQueryValueExW(readKey, NULL, NULL, NULL, (LPBYTE)keyValue, &valueLen) == ERROR_SUCCESS) { WCMD_output_asis(args); WCMD_output_asis(L"="); - /* If no default value found, leave line empty after '=' */ - if (rc == ERROR_SUCCESS) WCMD_output_asis(keyValue); + WCMD_output_asis(keyValue); WCMD_output_asis(L"\r\n"); RegCloseKey(readKey); - errorlevel = rc == ERROR_SUCCESS ? NO_ERROR : ERROR_INVALID_FUNCTION; + errorlevel = NO_ERROR; } else { WCHAR msgbuffer[MAXSTRING];
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index aa3f6af3a60..f57336358d4 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -1771,7 +1771,7 @@ footype=cmd.exe /c "echo '%*'" @todo_wine@' one two three'@or_broken@Skipped as not enough permissions foobar@or_broken@Skipped as not enough permissions --- resetting association -@todo_wine@original value@or_broken@buggyXP@or_broken@!WINE_FOO! +original value@or_broken@buggyXP@or_broken@!WINE_FOO! ------------ Testing CALL ------------ --- external script foo@space@
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=148046
Your paranoid android.
=== debian11b (64 bit WoW report) ===
ddraw: ddraw2.c:3735: Test failed: Expected screen size 1024x768, got 0x0. ddraw4.c:3969: Test failed: Expected message 0x5, but didn't receive it.
This merge request was approved by Elizabeth Figura.