[v5 03/12] reg.exe: Add REG_MULTI_SZ tests for reg add
Jonathan Vollebregt
jnvsor at gmail.com
Mon Oct 20 10:14:04 CDT 2014
On 10/20/2014 04:42 PM, Stefan Dösinger wrote:
> I think this shoudl work as well:
> const char buffer[] = "three\0little\0strings\0";
Then I'd get:
> warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
I could assign it at the start of the reg_add function but that seems a
bit out of place and since the REG_BINARY tests reuse the buffer it's
easier to have it non-const.
However, this did give me the idea of using:
> memcpy(buffer, "three\0little\0strings\0", 22);
> What about the following cases?
>
> /s ABC /d threeABClittleABCstrings
> /s \\0 /d three\\0little\\0strings
If the separator is more than one character native reg returns 1, though
I haven't tested for the second case.
> If you want to print the expected value I'd prefer something like this:
>
> todo_wine ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */),
> "got exit code %u, expected %u\n", r, REG_EXIT_SUCCESS);
I'll change my patches to this. Should I expand the commit to change the
existing tests as well?
More information about the wine-devel
mailing list