summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian A. Weber2016-02-01 15:42:04 +0100
committerChristian A. Weber2016-02-01 15:45:58 +0100
commit7b076048688ddd20fc698d19e1921155de8c48e5 (patch)
treebdceef3bf214c27130dec0f438e74a2295f0ac39 /tests
parent2ba8c034b134be1af855e1bfcb0b5acadc58cc2d (diff)
downloaditools-7b076048688ddd20fc698d19e1921155de8c48e5.tar.gz
itools-7b076048688ddd20fc698d19e1921155de8c48e5.tar.bz2
itools-7b076048688ddd20fc698d19e1921155de8c48e5.zip
add support for arrays of cidrs in cidr_match()
Diffstat (limited to 'tests')
-rwxr-xr-xtests/it.t1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/it.t b/tests/it.t
index 74ac57a..4fd848b 100755
--- a/tests/it.t
+++ b/tests/it.t
@@ -327,6 +327,7 @@ is(it::cidr_match('192.168.42.42', '192.168.42.64/26'), false, "cidr_match o
is(it::cidr_match('192.168.42.42', '192.168.42.32/27'), true, "cidr_match offset");
is(it::cidr_match('2001:918:ff83:101:798e:77c0:b722:fe56', '2001:918:ff83:101::/64'), true, "cidr_match ipv6");
is(it::cidr_match('2001:918:ff83:102:798e:77c0:b722:fe56', '2001:918:ff83:101::/64'), false, "cidr_match ipv6 no match" );
+is(it::cidr_match('10.11.12.13', array('10.0.0.0/8', '192.168.0.0./16')), true, "cidr_match array");
# it::filter_keys tests