File: 98nagios-sample-config.t

package info (click to toggle)
libnagios-object-perl 0.14-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 512 kB
  • ctags: 112
  • sloc: perl: 1,804; makefile: 53
file content (22 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use strict;
use Test::More qw(no_plan);
use lib qw( ./lib ../lib );
#BEGIN { plan tests => 7; }
eval { chdir('t') };

use_ok( 'Nagios::Config' );
use_ok( 'Nagios::Object::Config' );

my @sample_files = qw(
    sample-config-bigger.cfg
    sample-config-minimal.cfg
);

foreach my $file ( @sample_files ) {
    diag( "testing with Nagios sample file $file ..." );
	my $parser = Nagios::Object::Config->new( Version => '2.0' );
	$parser->parse( $file );
	
	ok( $parser->resolve_objects, "\$parser->resolve_objects" );
	ok( $parser->register_objects, "\$parser->register_objects" );
}