summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-13 14:46:59 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-13 14:46:59 -0800
commitbfa6748211a053e31edc710626413701e66e4c50 (patch)
tree47603b4ebde9f740b82fb2231ed6594c9ee11b67 /tests
parentf5e621b2c113c45ce661cf5bb27494fce22265a4 (diff)
downloadvyatta-cfg-bfa6748211a053e31edc710626413701e66e4c50.tar.gz
vyatta-cfg-bfa6748211a053e31edc710626413701e66e4c50.zip
Add test for is_ip_v4
More standalone test.
Diffstat (limited to 'tests')
-rw-r--r--tests/interface.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/interface.pl b/tests/interface.pl
index 79f4df4..c2a1a1b 100644
--- a/tests/interface.pl
+++ b/tests/interface.pl
@@ -7,13 +7,17 @@
use strict;
use warnings;
use Vyatta::Interface;
-use Vyatta::Misc qw(getInterfaces getInterfacesIPadresses);
+use Vyatta::Misc;
my @interfaces = getInterfaces();
print "Interfaces: ", join(' ',@interfaces),"\n";
-my @ips = getInterfacesIPadresses('all');
-print "IP addresses = ",join(' ',@ips), "\n";
+print "IP addresses = ";
+foreach my $addr (Vyatta::Misc::getInterfacesIPadresses('all')) {
+ print $addr, '(', is_ip_v4_or_v6($addr), ') ';
+}
+print "\n";
+
foreach my $arg (@interfaces) {
print "$arg : ";