diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-20 10:15:11 +1100 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-20 10:15:11 +1100 |
commit | abe20d48f6a96a2f636672d50b9274c71acf7d9f (patch) | |
tree | 213a492082311993fd4c2eab8c07f46d0ca72332 /tests/isip.pl | |
parent | 05f12fecffab242122c2702c049b48500ae8081a (diff) | |
download | vyatta-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.pl | 23 |
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; |