This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
APItest/t: Change some variable names
[perl5.git] / ext / XS-APItest / t / utf8_setup.pl
index 7327575..62b0649 100644 (file)
@@ -8,16 +8,24 @@
 
 sub isASCII { ord "A" == 65 }
 
-sub display_bytes {
+sub display_bytes_no_quotes {
     use bytes;
     my $string = shift;
-    return   '"'
-           . join("", map { sprintf("\\x%02x", ord $_) } split "", $string)
-           . '"';
+    return join("", map { sprintf("\\x%02x", ord $_) } split "", $string)
+}
+
+sub display_bytes {
+    return   '"' . display_bytes_no_quotes(shift) . '"';
 }
 
 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($) {
@@ -43,7 +51,7 @@ sub start_byte_to_cont($) {
 
 $::is64bit = length sprintf("%x", ~0) > 8;
 
-$::first_continuation = (isASCII) ? 0x80 : 0xA0;
+$::lowest_continuation = (isASCII) ? 0x80 : 0xA0;
 
 $::I8c = (isASCII) ? "\x80" : "\xa0";    # A continuation byte