Add language-specific comments for cmdline/output

This commit is contained in:
Pragmatic Software 2015-01-23 19:24:39 -08:00
parent 03d377000b
commit f31ce372cc
6 changed files with 36 additions and 0 deletions

View File

@ -13,6 +13,12 @@ sub initialize {
$self->{execfile} = 'prog.bash';
$self->{default_options} = '';
$self->{cmdline} = 'bash $options $sourcefile';
$self->{cmdline_opening_comment} = ": <<'____CMDLINE____'\n";
$self->{cmdline_closing_comment} = "____CMDLINE____\n";
$self->{output_opening_comment} = ": << '____OUTPUT____'\n";
$self->{output_closing_comment} = "____OUTPUT____\n";
}
1;

View File

@ -13,6 +13,12 @@ sub initialize {
$self->{execfile} = 'prog.ksh';
$self->{default_options} = '';
$self->{cmdline} = 'ksh $options $sourcefile';
$self->{cmdline_opening_comment} = ": <<'____CMDLINE____'\n";
$self->{cmdline_closing_comment} = "____CMDLINE____\n";
$self->{output_opening_comment} = ": << '____OUTPUT____'\n";
$self->{output_closing_comment} = "____OUTPUT____\n";
}
1;

View File

@ -21,6 +21,12 @@ sub postprocess_output {
$self->{output} =~ s/\s+at $self->{sourcefile} line \d+, near ".*?"//;
$self->{output} =~ s/\s*Execution of $self->{sourcefile} aborted due to compilation errors.//;
$self->{cmdline_opening_comment} = "=cut =============== CMDLINE ===============\n";
$self->{cmdline_closing_comment} = "=cut\n";
$self->{output_opening_comment} = "=cut =============== OUTPUT ===============\n";
$self->{output_closing_comment} = "=cut\n";
}
1;

View File

@ -13,6 +13,12 @@ sub initialize {
$self->{execfile} = 'prog.py';
$self->{default_options} = '';
$self->{cmdline} = 'python $options $sourcefile';
$self->{cmdline_opening_comment} = "'''\n=============== CMDLINE ===============\n";
$self->{cmdline_closing_comment} = "=============== CMDLINE ===============\n'''\n";
$self->{output_opening_comment} = "'''\n=============== OUTPUT ===============\n";
$self->{output_closing_comment} = "=============== OUTPUT ===============\n'''\n";
}
1;

View File

@ -13,6 +13,12 @@ sub initialize {
$self->{execfile} = 'prog.py3';
$self->{default_options} = '';
$self->{cmdline} = 'python3 $options $sourcefile';
$self->{cmdline_opening_comment} = "'''\n=============== CMDLINE ===============\n";
$self->{cmdline_closing_comment} = "=============== CMDLINE ===============\n'''\n";
$self->{output_opening_comment} = "'''\n=============== OUTPUT ===============\n";
$self->{output_closing_comment} = "=============== OUTPUT ===============\n'''\n";
}
1;

View File

@ -13,6 +13,12 @@ sub initialize {
$self->{execfile} = 'prog.sh';
$self->{default_options} = '';
$self->{cmdline} = 'sh $options $sourcefile';
$self->{cmdline_opening_comment} = ": <<'____CMDLINE____'\n";
$self->{cmdline_closing_comment} = "____CMDLINE____\n";
$self->{output_opening_comment} = ": << '____OUTPUT____'\n";
$self->{output_closing_comment} = "____OUTPUT____\n";
}
1;