texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: tp/t/test_utils.pl encode is() diagnostic message


From: Patrice Dumas
Subject: branch master updated: tp/t/test_utils.pl encode is() diagnostic messages using the locale
Date: Thu, 18 Aug 2022 17:38:37 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 14cee9b78c tp/t/test_utils.pl encode is() diagnostic messages using 
the locale
14cee9b78c is described below

commit 14cee9b78c19b3d87ba8a0fbed514ff6e3ac7068
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Aug 18 23:37:17 2022 +0200

    tp/t/test_utils.pl encode is() diagnostic messages using the locale
    
    Using code from Test::More documentation
---
 tp/t/test_utils.pl | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 399cf9d66c..6e361c7b94 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -121,6 +121,14 @@ foreach my $dir ('t', 't/results', $output_files_dir) {
 my $locale_encoding = langinfo(CODESET);
 $locale_encoding = undef if ($locale_encoding eq '');
 
+# to encode is() diagnostic messages.  From Test::More documentation
+if (defined($locale_encoding)) {
+  my $builder = Test::More->builder;
+  binmode $builder->output,         ":encoding($locale_encoding)";
+  binmode $builder->failure_output, ":encoding($locale_encoding)";
+  binmode $builder->todo_output,    ":encoding($locale_encoding)";
+}
+
 ok(1);
 
 my %formats = (
@@ -1343,12 +1351,7 @@ sub test($$)
     close (OUT);
     
     if ($self->{'generate'}) {
-      my $texinfo_text = 
Texinfo::Convert::Texinfo::convert_to_texinfo($result);
-      if (defined($locale_encoding)) {
-        $texinfo_text = Encode::encode($locale_encoding, $texinfo_text);
-      }
       print STDERR "--> $test_name\n";
-      #print STDERR "--> $test_name\n". $texinfo_text ."\n";
     }
   }
   if (!$self->{'generate'}) {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]