Software /
code /
prosody
Changeset
13428:dc1ad5f3f597
util.ip: Add another test case for match() and commonPrefixLength()
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 23 Feb 2024 12:03:31 +0000 |
parents | 13427:9677df320992 |
children | 13429:6cdc6923d65a |
files | spec/util_ip_spec.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/spec/util_ip_spec.lua Fri Feb 23 11:59:45 2024 +0000 +++ b/spec/util_ip_spec.lua Fri Feb 23 12:03:31 2024 +0000 @@ -36,6 +36,8 @@ assert.are.equal(match(_"8.8.8.8", _"8.8.0.0", 16), true); assert.are.equal(match(_"8.8.4.4", _"8.8.0.0", 16), true); + + assert.are.equal(match(_"fe80::1", _"fec0::", 10), false); end); end); @@ -98,6 +100,8 @@ assert_cpl6("abcd::1", "abcd::1", 128); assert_cpl6("abcd::abcd", "abcd::", 112); assert_cpl6("abcd::abcd", "abcd::abcd:abcd", 96); + + assert_cpl6("fe80::1", "fec0::", 9); end); end);