regsvr32/tests: Add initial tests

Francois Gouget fgouget at free.fr
Tue Jan 12 05:58:59 CST 2016


On Tue, 12 Jan 2016, Hugh McMaster wrote:
[...]
> diff --git a/programs/regsvr32/tests/Makefile.in b/programs/regsvr32/tests/Makefile.in
> new file mode 100644
> index 0000000..61d25fe
> --- /dev/null
> +++ b/programs/regsvr32/tests/Makefile.in
[...]
> +ifneq (,$(filter crosstest mingw,$(MAKECMDGOALS) $(findstring mingw,$(CC))))
> +  TARGET_DLLS = $(addsuffix .dll, $(DLL_BASENAMES))

I believe the syntax on these last two lines is specific to GNU make 
which is something that Wine has tried to avoid so far.

Note that more generally getting a dll into this test will be pretty 
tricky. Would it be possible to do the tests using an existing dll?

Alternatively would it work to add the test's dll to dlls/ and 
grab and include it as a resource in programs/regsvr32/tests? 
This may help avoid makefile shenanigans.


> diff --git a/programs/regsvr32/tests/regsvr32.c b/programs/regsvr32/tests/regsvr32.c
> new file mode 100644
> index 0000000..746c81f
> --- /dev/null
> +++ b/programs/regsvr32/tests/regsvr32.c
[...]
> +#define run_test(...) run_test_(output, &r, __VA_ARGS__)

A macro with a variable argument list? That does not seem portable (or 
maybe is a > C99 feature).


> +static BOOL __cdecl run_test_(char *output, DWORD *r, const char *fmt, ...)
> +{
> +   __ms_va_list va_args;

Shouldn't this be using something like __winetest_va_list?
To be checked...


> +#define CMP(s) !strcmp(output, s)

This macro is totally unnecessary.


-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
      Broadcast message : fin du monde dans cinq minutes, repentez vous !



More information about the wine-devel mailing list