Skip to content
Snippets Groups Projects
Commit ccce753d authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- empty output should reported as '$col1,,$col3' instead of '$col1,"",$col3'

parent 73e4cde6
Branches
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ sub print_results($headers_ref, $result_ref) {
my $line = $_;
my $res_line = join(
",",
map {m/^\d+(\.\d+)?$/ ? $_ : "\"$_\""}
map {m/^(\d+(\.\d+)?)?$/ ? $_ : "\"$_\""}
map {$line->{$_} // ""} @{$headers_ref}
);
$res_line;
......
......@@ -39,6 +39,6 @@ is($? >> 8, 0, 'ta-tool report, base, exit status');
$testapp->run(args =>'report --output-as-csv');
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/^"set","subset","aip_state","flavour","value"\n"([a-z]+)","","([a-z]+)","([a-z]+)",\d+(\.\d+)?\n/s, 'ta-tool report, base, stdout');
like($testapp->stdout, qr/^"set","subset","aip_state","flavour","value"\n"([a-z]+)",,"([a-z]+)","([a-z]+)",\d+(\.\d+)?\n/s, 'ta-tool report, base, stdout');
like($testapp->stderr, qr/^reporting for period/s, 'ta-tool report, base, stderr');
is($? >> 8, 0, 'ta-tool report, base, exit status');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment