This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
APItest/t/utf8_setup.pl: Make sure diagnostics are on separate lines
[perl5.git] / ext / XS-APItest / t / utf8_setup.pl
index 2f676a3..dd3992d 100644 (file)
@@ -19,7 +19,13 @@ sub display_bytes {
 }
 
 sub output_warnings(@) {
-    diag "The warnings were:\n" . join("", @_);
+    my @list = @_;
+    if (@list) {
+        diag "The warnings were:\n" . join "\n", map { chomp; $_ } @list;
+    }
+    else {
+        diag "No warnings were raised";
+    }
 }
 
 sub start_byte_to_cont($) {