-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-10-20 17:14, schrieb Jonathan Vollebregt:
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);
That would work. IMHO using separate variables that are declared in a way that don't need magic sizes is nicer, but I'll leave this up to you. And I don't know what Alexandre prefers either way.
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.
Afaics your tests don't distinguish between the case that the separator is more than one character and the case that the separator does not occur in the input value.
In other words, this needs another test: /s # /d onebigstring
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?
Yes please.
Thanks again for your work!
Stefan