Their test cases don’t include alternative ipv4 representations, e.g 127.1 is a valid IP address.
From wikipedia: “When fewer than four numbers are specified in the address in dotted notation, the last value is treated as an integer of as many bytes as are required to fill out the address to four octets. (https://en.wikipedia.org/wiki/Internet_Protocol_version_4)