On 3/4/22 13:35, Paul Gofman wrote:
On 3/4/22 22:33, Zebediah Figura wrote:
On 3/3/22 04:32, Paul Gofman wrote:
- allow any space as terminator and add tests for that;
Somehow the tests didn't seem to make it into this patch.
Eh... I added the whole loop for that which tests all the possible characters in the end of the string?
+ }
+ strcpy(str, "1.2.3"); + str[6] = 0; + for (i = 1; i < 256; ++i) + { + if (isdigit(i)) + continue; + str[5] = i; + expected = isspace(i) ? 0x03000201 : 0xffffffff; + addr = inet_addr(str); + ok(addr == expected, "got addr %#08x, expected %#08x, i %u\n", addr, expected, i); + } +}
Ah, I see you did. I was expecting them to be added as part of the tests[] array, but that works too :-)