tests for toIPv6 and IPv6StringToNum

This commit is contained in:
bharatnc 2021-01-24 23:23:30 -08:00
parent 7abedaeaa0
commit a102c78328
2 changed files with 6 additions and 0 deletions

View File

@ -49,3 +49,5 @@ FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF is ipv6 string: 1
::ffff:127.0.0.1 is ipv6 string: 1
::ffff:8.8.8.8 is ipv6 string: 1
2001:0DB8:AC10:FE01:FEED:BABE:CAFE:F00D is ipv6 string: 1
::ffff:127.0.0.1
::ffff:127.0.0.1

View File

@ -84,3 +84,7 @@ SELECT '::ffff:127.0.0.1 is ipv6 string: ', isIPv6String(
SELECT '::ffff:8.8.8.8 is ipv6 string: ', isIPv6String('::ffff:8.8.8.8');
SELECT '2001:0DB8:AC10:FE01:FEED:BABE:CAFE:F00D is ipv6 string: ', isIPv6String('2001:0DB8:AC10:FE01:FEED:BABE:CAFE:F00D');
-- IPV6 functions parse IPv4 addresses.
SELECT toIPv6('127.0.0.1');
SELECT cutIPv6(IPv6StringToNum('127.0.0.1'), 0, 0);