Francois Gouget <fgouget(a)codeweavers.com> writes:
> Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
> ---
> dlls/shell32/tests/shlexec.c | 75 ++++++++++++++++++++++++++++++--------------
> 1 file changed, 52 insertions(+), 23 deletions(-)
>
> diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
> index 8f03799..360fb2b 100644
> --- a/dlls/shell32/tests/shlexec.c
> +++ b/dlls/shell32/tests/shlexec.c
> @@ -94,6 +94,28 @@ static int _todo_wait = 0;
> #define todo_wait for (_todo_wait = 1; _todo_wait; _todo_wait = 0)
>
> static char shell_call[2048]="";
> +static char last_shell_call[2048]="";
> +static void WINETEST_PRINTF_ATTR(2,3) _okShell(int condition, const char *msg, ...)
> +{
> + va_list valist;
> +
> + /* Note: if winetest_debug > 1 the ShellExecute() command has already been
> + * traced.
> + */
> + if (winetest_debug <= 1 && !condition && strcmp(last_shell_call, shell_call))
> + {
> + winetest_trace("Called %s\n", shell_call);
> + strcpy(last_shell_call, shell_call);
> + }
> +
> + va_start(valist, msg);
> + winetest_vok(condition, msg, valist);
> + va_end(valist);
> +}
Why is that better than always printing it in the failing calls?
--
Alexandre Julliard
julliard(a)winehq.org