Escape newlines in skip reason
Dagfinn Ilmari Mannsåker [Mon, 11 Dec 2017 12:14:40 +0000 (12:14 +0000)]
lib/Test/SQL/Translator.pm

index 67dc4f9..0181156 100644 (file)
@@ -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";
         }
     }