From 9edfd0002bea4d591cb363be536c652ef3f16079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Sat, 20 Jul 2019 18:19:38 +0000 Subject: add inet:subnets() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Asbjørn Sloth Tønnesen --- test/inet.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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() -- cgit v1.2.1