Basics/Option first section level [ System tests ]
FUNCTION
Test --first_section_level.
The level of the first section should be at level 3 instead of 1.
SOURCE
{ add_source( "test.c", $test_source_2 ); mkdocdir(); my ( $out, $err ) = runrobo( qw(--src Src --doc Doc/test --singledoc --sections --test --toc --first_section_level 3)); # expected results: is( $out, '', 'No ouput' ); is( $err, '', '... and no error' ); file_exists_ok( "Doc/test.xml", 'there should be documentation' ); # Now test the level of the first header. my $documentation = XMLin( 'Doc/test.xml' ); my $section = $documentation->{'section'}; is ( $section->[0]->{'depth'}, '3', 'First section is at level 3' ); my $subsection = $section->[0]->{'section'}; is ( $subsection->{'depth'}, '4', 'First subsection is at level 4' ); is ( $section->[1]->{'depth'}, '3', 'Second section is at level 3' ); clean(); }