/[libconf]/libconf/perl-Libconf/test/nagios/nagios_test.pl
ViewVC logotype

Diff of /libconf/perl-Libconf/test/nagios/nagios_test.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by dams, Wed Dec 3 02:06:48 2003 UTC revision 1.5 by tv, Wed Dec 3 11:30:01 2003 UTC
# Line 3  Line 3 
3  use Libconf qw(:functions);  use Libconf qw(:functions);
4  use Data::Dumper;  use Data::Dumper;
5    
 my $struct;  
   
6  # test 1, minimal requirement : regenerate correctly  # test 1, minimal requirement : regenerate correctly
7  my $struct = new Libconf("hostgroups.cfg", 'nagios', '');  my $struct = new Libconf("hostgroups.cfg", 'nagios', '');
8  #print " ----- " . Dumper($struct) . "\n";  #print " ----- " . Dumper($struct) . "\n";
# Line 23  test(2); Line 21  test(2);
21  display(3);  display(3);
22  $struct = new Libconf("hostgroups.cfg", 'nagios', '');  $struct = new Libconf("hostgroups.cfg", 'nagios', '');
23  $struct->appendAtom({section_name => 'section', type => 'SECTION', 'sections' => [] });  $struct->appendAtom({section_name => 'section', type => 'SECTION', 'sections' => [] });
24  $struct->appendAtom({key => 'alias2', list => ['some', 'stuff'], type => 'KEY_LIST'});  $struct->appendAtom({key => 'alias2', list => [ 'some', 'stuff' ], type => 'KEY_LIST' });
25  $struct->appendAtom({type => 'ENDSECTION', 'sections' => [] });  $struct->appendAtom({type => 'ENDSECTION', 'sections' => [] });
26  $struct->writeConf("nagios_output_3");  $struct->writeConf("nagios_output_3");
27  test(3);  test(3);

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26