ASCII Generator/smoke test [ System tests ]

FUNCTION

Try different combination of options. This should not cause any asserts().

SOURCE

{
    my @sources = ( \$dummy_header_1, \$dummy_header_2 );

    foreach my $source_ref ( @sources ) {
        foreach my $mode_1 qw( --sections --toc --index --nopre ) {
            foreach my $mode_2 qw( --singledoc --multidoc ) {
                mkdocdir();
                add_source( "test.c", $$source_ref );
                my ( $out, $err ) = runrobo(
                    qw(--src Src
                    --doc Doc/test
                    --ascii
                    ), $mode_1, $mode_2 );
                # expected results:
                is( $out, '', 'No ouput' );
                is( $err, '', '... and no error' );
                my $file_name;
                # Docments names differ for the different
                # modes.
                if ( $mode_2 eq "--multidoc" ) {
                    $file_name = "Doc/test/test_c.txt";
                } else {
                    $file_name = "Doc/test.txt";
                }
                file_exists_ok( $file_name, 
                    'there should be documentation' );
                clean();
            }
        }
    }
}