Annotate

tests/test_util_ip.lua @ 5604:6df0ec991f2e

tests: Some much-needed cleanup...
author Matthew Wild <mwild1@gmail.com>
date Sat, 18 May 2013 17:14:30 +0100
child 5606:3dc141acf381
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5604
6df0ec991f2e tests: Some much-needed cleanup...
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1
6df0ec991f2e tests: Some much-needed cleanup...
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2 function test_match(match_ip)
6df0ec991f2e tests: Some much-needed cleanup...
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 assert(match_ip("10.20.30.40", "10.0.0.0/8"));
6df0ec991f2e tests: Some much-needed cleanup...
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 assert(match_ip("80.244.94.84", "80.244.94.84"));
6df0ec991f2e tests: Some much-needed cleanup...
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 assert(match_ip("8.8.8.8", "8.8.0.0/16"));
6df0ec991f2e tests: Some much-needed cleanup...
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 assert(match_ip("8.8.4.4", "8.8.0.0/16"));
6df0ec991f2e tests: Some much-needed cleanup...
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 end