diff options
author | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2019-07-20 18:19:38 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2019-07-20 18:19:38 +0000 |
commit | 9edfd0002bea4d591cb363be536c652ef3f16079 (patch) | |
tree | ac6574c09294672d5cbe79eae186588934df5d8f /test | |
parent | d42329c948cafec31250c8cdba028d116a76a709 (diff) | |
download | lua-inet-9edfd0002bea4d591cb363be536c652ef3f16079.tar.gz lua-inet-9edfd0002bea4d591cb363be536c652ef3f16079.tar.xz lua-inet-9edfd0002bea4d591cb363be536c652ef3f16079.zip |
add inet:subnets()
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
Diffstat (limited to 'test')
-rw-r--r-- | test/inet.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/inet.lua b/test/inet.lua index b974179..f2968bd 100644 --- a/test/inet.lua +++ b/test/inet.lua @@ -305,6 +305,11 @@ local function misc() assert(inet('2001:db8::42/64'):bits(0) == nil) assert(inet('2001:db8::42/64'):bits(42) == nil) assert(inet('2001:db8::42/64'):bits(64) == nil) + + assert(inet('192.0.2.24'):subnets(-1) == nil) + assert(inet('192.0.2.24'):subnets(33) == nil) + assert(inet('2001:db8::42/64'):subnets(-1) == nil) + assert(inet('2001:db8::42/64'):subnets(129) == nil) end local t = test.new() |