summaryrefslogtreecommitdiff
path: root/tests/isip.pl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-20 10:15:11 +1100
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-20 10:15:11 +1100
commitabe20d48f6a96a2f636672d50b9274c71acf7d9f (patch)
tree213a492082311993fd4c2eab8c07f46d0ca72332 /tests/isip.pl
parent05f12fecffab242122c2702c049b48500ae8081a (diff)
downloadvyatta-cfg-abe20d48f6a96a2f636672d50b9274c71acf7d9f.tar.gz
vyatta-cfg-abe20d48f6a96a2f636672d50b9274c71acf7d9f.zip
update unit tests
Add more unit tests.
Diffstat (limited to 'tests/isip.pl')
-rw-r--r--tests/isip.pl23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/isip.pl b/tests/isip.pl
new file mode 100644
index 0000000..35a04b7
--- /dev/null
+++ b/tests/isip.pl
@@ -0,0 +1,23 @@
+#! /usr/bin/perl
+
+# Standalone test for Vyatta::Misc::isIPInterfaces
+
+use strict;
+use warnings;
+use Vyatta::Misc;
+use Vyatta::Interface;
+
+my $vc;
+my @interfaces = getInterfaces();
+print "Interfaces: ", join(' ',@interfaces),"\n";
+
+foreach my $lip (@ARGV) {
+ print $lip, " is";
+ if (Vyatta::Misc::isIPinInterfaces($vc, $lip, @interfaces)) {
+ print " in\n";
+ } else {
+ print " not in\n";
+ }
+}
+
+exit 0;