aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_util_ip.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-05-18 17:14:30 +0100
committerMatthew Wild <mwild1@gmail.com>2013-05-18 17:14:30 +0100
commite491b17e6f0187c419ac9a4d7178d9b1b9ac88be (patch)
treef39ac325409c6e76318d8a769f8217332e16f1d1 /tests/test_util_ip.lua
parent62a1d8a2d312c61673f868878efdcb747c63f772 (diff)
downloadprosody-e491b17e6f0187c419ac9a4d7178d9b1b9ac88be.tar.gz
prosody-e491b17e6f0187c419ac9a4d7178d9b1b9ac88be.zip
tests: Some much-needed cleanup...
Diffstat (limited to 'tests/test_util_ip.lua')
-rw-r--r--tests/test_util_ip.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_util_ip.lua b/tests/test_util_ip.lua
new file mode 100644
index 00000000..ce7c397f
--- /dev/null
+++ b/tests/test_util_ip.lua
@@ -0,0 +1,7 @@
+
+function test_match(match_ip)
+ assert(match_ip("10.20.30.40", "10.0.0.0/8"));
+ assert(match_ip("80.244.94.84", "80.244.94.84"));
+ assert(match_ip("8.8.8.8", "8.8.0.0/16"));
+ assert(match_ip("8.8.4.4", "8.8.0.0/16"));
+end