/[vz-tools]/trunk/t/10-vz.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/t/10-vz.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 53 - (hide annotations)
Fri Aug 15 10:50:32 2008 UTC (15 years, 8 months ago) by dpavlin
File MIME type: application/x-troff
File size: 524 byte(s)
skip if not run as root
1 dpavlin 42 #!/usr/bin/perl
2     use warnings;
3     use strict;
4    
5     use Test::More tests => 7;
6     use blib;
7    
8     my $debug = shift @ARGV;
9    
10     BEGIN {
11     use_ok('VZ');
12     }
13    
14     is_deeply( hostname2ip('localhost'), '127.0.0.1', 'hostname2ip' );
15    
16     is_deeply( ip2hostname('127.0.0.1'), 'localhost', 'ip2hostname' );
17    
18     ok(conf_veids(), 'conf_veids');
19    
20 dpavlin 53
21     SKIP: {
22    
23     skip( 'need root', 3 ) unless $> == 0;
24    
25 dpavlin 42 ok(my $text = vzlist(), 'vzlist');
26     diag $text if $debug;
27    
28     ok(my $hash = vzlist( hash => 1 ), 'vzlist( hash => 1 )');
29     diag dump($hash) if $debug;
30    
31     isa_ok($hash, 'HASH');
32    
33 dpavlin 53 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26