From: Dagfinn Ilmari Mannsåker Date: Mon, 11 Dec 2017 12:14:40 +0000 (+0000) Subject: Escape newlines in skip reason X-Git-Tag: v0.11024~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9d226a8fb2ea12e3880f9adce21c196baf27110e;p=dbsrgits%2FSQL-Translator.git Escape newlines in skip reason --- diff --git a/lib/Test/SQL/Translator.pm b/lib/Test/SQL/Translator.pm index 67dc4f9..0181156 100644 --- a/lib/Test/SQL/Translator.pm +++ b/lib/Test/SQL/Translator.pm @@ -466,7 +466,8 @@ sub maybe_plan { push @errors, $module; } else { - push @errors, "$module: $@"; + (my $err = $@) =~ s/\n+/\\n/g; # Can't have newlines in the skip message + push @errors, "$module: $err"; } }