[PATCH v3] shell32/tests: Avoid ever changing values in the shlexec failure messages.

Alexandre Julliard julliard at winehq.org
Mon Mar 16 16:45:32 CDT 2020


Francois Gouget <fgouget at codeweavers.com> writes:

> On Sun, 15 Mar 2020, Zebediah Figura wrote:
> [...]
>> This seems an awful lot of effort to put in just to avoid a variable string
>> being printed. Is there really anything we get out of having those strings
>> printed in the first place? Would it be better to just remove them?
>
> They are absolutely necessary to figure out why the test failed.
>
> shlexec.c:2507: Test failed: ShellExecuteEx(mask="0x8540", 
> file="C:\Users\winetest\AppData\Local\Temp\wtDDDD.tmp\test file.sde") 
>                                                        ^^^
>
> This here is the file ShellExecute() is trying to open. What 
> ShellExecute() does is driven in large part by that file's extension.
>
> topic="dde" ddeExec expected 
> '[open("C:\Users\winetest\AppData\Local\Temp\wtDDDD.tmp\test file.sde")]', got ''
>
> And I don't know much about DDE, but I guess this is the path our DDE 
> server should have received. I guess for this one we could write 
> somethig like 'unexpectedly got an empty string', but of course this 
> would not work if the string is not empty and not what we expect.

I'd suggest to simply avoid GetTempFileName(). In general it's of course
preferable to generate a filename instead of hardcoding it, but in such
cases it doesn't seem worth the extra trouble.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list