On 2024-07-25 13:11, Bruno Haible wrote:
+ strtol_error s_err = __xstrtol (input, &endp, -1, &val, "k"); + ASSERT (s_err == LONGINT_INVALID); + ASSERT (endp == NULL); + ASSERT (val == -17);
This isn't a valid test case. If the base is -1, the underlying strtol can support any base notation it likes. It might, for example, support base 64 and the "k" would be valid input.
If the documentation doesn't make it sufficiently clear that the behavior is not fully specified with an invalid base, we can do that. But let's not waste time testing corner cases that don't matter.