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 (convert_to_info): If not ou


From: Gavin D. Smith
Subject: branch master updated: * tp/t/test_utils.pl (convert_to_info): If not outputting to a file, set OUTPUT_PERL_ENCODING to an empty string to disable any character encoding.
Date: Sat, 30 Dec 2023 11:43:40 -0500

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

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new a4551cdde2 * tp/t/test_utils.pl (convert_to_info): If not outputting 
to a file, set OUTPUT_PERL_ENCODING to an empty string to disable any character 
encoding.
a4551cdde2 is described below

commit a4551cdde207fd5f778fc7412d8ec294f26fbbee
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Dec 30 16:39:09 2023 +0000

    * tp/t/test_utils.pl (convert_to_info): If not outputting to
    a file, set OUTPUT_PERL_ENCODING to an empty string to disable
    any character encoding.
    
    This is in order to minimise changes to the test results when
    Texinfo::Convert::Plaintext::convert starts returning an encoded
    string in the future.  This changes some byte offsets in the
    test results to meaningless values.  If these offsets needed to be
    tested, a separate Info output file would have to be used instead.
---
 ChangeLog                                          | 12 +++++
 tp/t/results/converters_tests/commands_in_sc.pl    |  4 +-
 .../some_at_commands_in_ref_nodes.pl               |  2 +-
 .../formats_encodings/at_commands_in_refs.pl       | 54 +++++++++++-----------
 tp/t/results/info_tests/test_index.pl              |  2 +-
 tp/t/results/languages/command_translated.pl       |  2 +-
 .../results/languages/multiple_documentlanguage.pl |  4 +-
 tp/t/results/languages/multiple_in_preamble.pl     |  4 +-
 .../languages/multiple_in_preamble_before_node.pl  |  4 +-
 .../moresectioning/only_special_spaces_node.pl     |  8 ++--
 .../moresectioning/special_spaces_in_nodes.pl      | 18 ++++----
 .../sectioning/in_menu_only_special_spaces_node.pl |  8 ++--
 .../in_menu_only_special_spaces_node_menu.pl       |  8 ++--
 .../reference_to_only_special_spaces_node.pl       |  2 +-
 tp/t/test_utils.pl                                 | 10 ++++
 15 files changed, 82 insertions(+), 60 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 33bb91a55d..5b560cc9b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2023-12-27  Gavin Smith <gavinsmith0123@gmail.com>
+
+       * tp/t/test_utils.pl (convert_to_info): If not outputting to
+       a file, set OUTPUT_PERL_ENCODING to an empty string to disable
+       any character encoding.
+
+       This is in order to minimise changes to the test results when
+       Texinfo::Convert::Plaintext::convert starts returning an encoded
+       string in the future.  This changes some byte offsets in the
+       test results to meaningless values.  If these offsets needed to be
+       tested, a separate Info output file would have to be used instead.
+
 2023-12-30  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/convert_html.c
diff --git a/tp/t/results/converters_tests/commands_in_sc.pl 
b/tp/t/results/converters_tests/commands_in_sc.pl
index 7d62ce6a47..53e845b952 100644
--- a/tp/t/results/converters_tests/commands_in_sc.pl
+++ b/tp/t/results/converters_tests/commands_in_sc.pl
@@ -963,8 +963,8 @@ MA+TH (1) <la> B (a) LB c E <a@c> AB (D)
 Tag Table:
 Node: Top27
 Node: chap124
-Ref: inanchor264
-Ref: chap-Footnote-1346
+Ref: inanchor262
+Ref: chap-Footnote-1343
 
 End Tag Table
 
diff --git a/tp/t/results/converters_tests/some_at_commands_in_ref_nodes.pl 
b/tp/t/results/converters_tests/some_at_commands_in_ref_nodes.pl
index adb620efc9..0f92be61b2 100644
--- a/tp/t/results/converters_tests/some_at_commands_in_ref_nodes.pl
+++ b/tp/t/results/converters_tests/some_at_commands_in_ref_nodes.pl
@@ -1589,7 +1589,7 @@ see *note (manual)a *strong* ref with SC, a i trema ï, a 
dotless i trema
 
 Tag Table:
 Node: Top27
-Node: A SC Ñ Å TeX node ï ï Ḕ ł Ḉ ¡172
+Node: A SC Ñ Å TeX node ï ï Ḕ ł Ḉ ¡152
 
 End Tag Table
 
diff --git a/tp/t/results/formats_encodings/at_commands_in_refs.pl 
b/tp/t/results/formats_encodings/at_commands_in_refs.pl
index 13b69d19ab..64ac2c45e7 100644
--- a/tp/t/results/formats_encodings/at_commands_in_refs.pl
+++ b/tp/t/results/formats_encodings/at_commands_in_refs.pl
@@ -16972,33 +16972,33 @@ File: ,  Node: <http://somewhere_aaa> text (url) ls,  
Prev: _{g}H 3^{rd},  Up: T
 
 Tag Table:
 Node: Top27
-Node: { }875
-Node:     ! . . ? @954
-Node: @ { } \\ #1058
-Node: LaTeX TeX • , © ... ...1180
-Node: ≡ error→ € ¡ ↦ −1347
-Node: ≥ ≤ →1510
-Node: ª º ⋆ £ ⊣ ¿ ®1640
-Node: ⇒ ° a b a sunny day å1787
-Node: Å æ œ Æ Œ ø Ø ß ł Ł Ð ð Þ þ1975
-Node: ä ẽ î â à é ç ē e̊ e̋ ę2198
-Node: ė ĕ e̲ ẹ ě ȷ e͡e2410
-Node: ı Ḕ Ḉ2573
-Node: “ ” ‘ ’ „ ‚2701
-Node: « » « » ‹ ›2843
-Node: `` \'\' --- -- ` \'2987
-Node: AAA (fff) AAA BBB3119
-Node: CCC (rrr) CCC DDD3259
-Node: the someone <someone@somewher> <no_explain@there>3432
-Node: [f--ile1] [image src="f--ile.png" alt="alt" text="Image 
description\\"\\"\\\\."]3732
-Node:  @ {} . 4082
-Node: cite asis in @w b in r SC *str* t VAR dfn i4285
-Node: env code option samp command file C-x <ESC>4537
-Node: 8.27in4827
-Node: sansserif slanted4961
-Node: indicateurl5085
-Node: _{g}H 3^{rd}5211
-Node: <http://somewhere_aaa> text (url) ls5350
+Node: { }783
+Node:     ! . . ? @862
+Node: @ { } \\ #966
+Node: LaTeX TeX • , © ... ...1085
+Node: ≡ error→ € ¡ ↦ −1235
+Node: ≥ ≤ →1367
+Node: ª º ⋆ £ ⊣ ¿ ®1465
+Node: ⇒ ° a b a sunny day å1584
+Node: Å æ œ Æ Œ ø Ø ß ł Ł Ð ð Þ þ1741
+Node: ä ẽ î â à é ç ē e̊ e̋ ę1920
+Node: ė ĕ e̲ ẹ ě ȷ e͡e2086
+Node: ı Ḕ Ḉ2216
+Node: “ ” ‘ ’ „ ‚2314
+Node: « » « » ‹ ›2419
+Node: `` \'\' --- -- ` \'2535
+Node: AAA (fff) AAA BBB2659
+Node: CCC (rrr) CCC DDD2799
+Node: the someone <someone@somewher> <no_explain@there>2972
+Node: [f--ile1] [image src="f--ile.png" alt="alt" text="Image 
description\\"\\"\\\\."]3272
+Node:  @ {} . 3622
+Node: cite asis in @w b in r SC *str* t VAR dfn i3825
+Node: env code option samp command file C-x <ESC>4069
+Node: 8.27in4331
+Node: sansserif slanted4465
+Node: indicateurl4589
+Node: _{g}H 3^{rd}4711
+Node: <http://somewhere_aaa> text (url) ls4850
 
 End Tag Table
 
diff --git a/tp/t/results/info_tests/test_index.pl 
b/tp/t/results/info_tests/test_index.pl
index ad4e094d8f..aebc47b1a2 100644
--- a/tp/t/results/info_tests/test_index.pl
+++ b/tp/t/results/info_tests/test_index.pl
@@ -3848,7 +3848,7 @@ Tag Table:
 Node: Top27
 Node: name330
 Node: name1 looooooooooooooooooooooooooooooooooooooooooooooooooooooooong982
-Ref: a counting anchor3071
+Ref: a counting anchor3070
 
 End Tag Table
 
diff --git a/tp/t/results/languages/command_translated.pl 
b/tp/t/results/languages/command_translated.pl
index b56501b173..a2f0873ae9 100644
--- a/tp/t/results/languages/command_translated.pl
+++ b/tp/t/results/languages/command_translated.pl
@@ -390,7 +390,7 @@ File: ,  Node: chapter erreur→,  Prev: Top,  Up: Top
 
 Tag Table:
 Node: Top27
-Node: chapter erreur→157
+Node: chapter erreur→149
 
 End Tag Table
 
diff --git a/tp/t/results/languages/multiple_documentlanguage.pl 
b/tp/t/results/languages/multiple_documentlanguage.pl
index 97a3960fd5..8fbd40bc0c 100644
--- a/tp/t/results/languages/multiple_documentlanguage.pl
+++ b/tp/t/results/languages/multiple_documentlanguage.pl
@@ -1205,8 +1205,8 @@ File: ,  Node: chap,  Prev: Top,  Up: Top
 
 
 Tag Table:
-Node: Top84
-Node: chap159
+Node: Top82
+Node: chap157
 
 End Tag Table
 
diff --git a/tp/t/results/languages/multiple_in_preamble.pl 
b/tp/t/results/languages/multiple_in_preamble.pl
index 732e8d0578..c89cf44b8d 100644
--- a/tp/t/results/languages/multiple_in_preamble.pl
+++ b/tp/t/results/languages/multiple_in_preamble.pl
@@ -1062,8 +1062,8 @@ File: ,  Node: chapter,  Prev: Top,  Up: Top
 
 
 Tag Table:
-Node: Top84
-Node: chapter181
+Node: Top81
+Node: chapter178
 
 End Tag Table
 
diff --git a/tp/t/results/languages/multiple_in_preamble_before_node.pl 
b/tp/t/results/languages/multiple_in_preamble_before_node.pl
index cccb9c8a58..1cc7611ee9 100644
--- a/tp/t/results/languages/multiple_in_preamble_before_node.pl
+++ b/tp/t/results/languages/multiple_in_preamble_before_node.pl
@@ -903,8 +903,8 @@ File: ,  Node: chapter,  Prev: Top,  Up: Top
 
 
 Tag Table:
-Node: Top113
-Node: chapter210
+Node: Top110
+Node: chapter207
 
 End Tag Table
 
diff --git a/tp/t/results/moresectioning/only_special_spaces_node.pl 
b/tp/t/results/moresectioning/only_special_spaces_node.pl
index 93a8ac1f2c..87e52102eb 100644
--- a/tp/t/results/moresectioning/only_special_spaces_node.pl
+++ b/tp/t/results/moresectioning/only_special_spaces_node.pl
@@ -956,10 +956,10 @@ File: ,  Node:           ,  Prev: ᠎ ,  Up: Top
 
 Tag Table:
 Node: Top56
-Node:    199
-Node: …  497
-Node: ᠎ 679
-Node:           859
+Node:    159
+Node: …  445
+Node: ᠎ 615
+Node:           763
 
 End Tag Table
 
diff --git a/tp/t/results/moresectioning/special_spaces_in_nodes.pl 
b/tp/t/results/moresectioning/special_spaces_in_nodes.pl
index 8e6c669556..e154972846 100644
--- a/tp/t/results/moresectioning/special_spaces_in_nodes.pl
+++ b/tp/t/results/moresectioning/special_spaces_in_nodes.pl
@@ -1376,15 +1376,15 @@ File: ,  Node: NARROW NO-BREAK SPACE| | MEDIUM 
MATHEMATICAL SPACE| | IDEOGRA
 
 Tag Table:
 Node: Top 55
-Node: EN QUAD| | EM QUAD| | EN SPACE| |191
-Node: CHARACTER TABULATION| | FORM FEED| | LINE TABULATION| |768
-Node: CARRIAGE RETURN| |915
-Node: NEXT LINE (NEL)|…| NO-BREAK SPACE| | OGHAM SPACE MARK| |1131
-Node: MONGOLIAN VOWEL SEPARATOR|᠎| EM SPACE| |1336
-Node: THREE-PER-EM SPACE| | FOUR-PER-EM SPACE| | SIX-PER-EM SPACE| |1591
-Node: FIGURE SPACE| | PUNCTUATION SPACE| | THIN SPACE| |1842
-Node: HAIR SPACE| | LINE SEPARATOR|
| PARAGRAPH SEPARATOR|
|2109
-Node: NARROW NO-BREAK SPACE| | MEDIUM MATHEMATICAL SPACE| | IDEOGRAPHIC SPACE| 
|2388
+Node: EN QUAD| | EM QUAD| | EN SPACE| |177
+Node: CHARACTER TABULATION| | FORM FEED| | LINE TABULATION| |714
+Node: CARRIAGE RETURN| |855
+Node: NEXT LINE (NEL)|…| NO-BREAK SPACE| | OGHAM SPACE MARK| |1061
+Node: MONGOLIAN VOWEL SEPARATOR|᠎| EM SPACE| |1252
+Node: THREE-PER-EM SPACE| | FOUR-PER-EM SPACE| | SIX-PER-EM SPACE| |1487
+Node: FIGURE SPACE| | PUNCTUATION SPACE| | THIN SPACE| |1716
+Node: HAIR SPACE| | LINE SEPARATOR|
| PARAGRAPH SEPARATOR|
|1959
+Node: NARROW NO-BREAK SPACE| | MEDIUM MATHEMATICAL SPACE| | IDEOGRAPHIC SPACE| 
|2214
 
 End Tag Table
 
diff --git a/tp/t/results/sectioning/in_menu_only_special_spaces_node.pl 
b/tp/t/results/sectioning/in_menu_only_special_spaces_node.pl
index bfc9c4191e..1c05c68e8f 100644
--- a/tp/t/results/sectioning/in_menu_only_special_spaces_node.pl
+++ b/tp/t/results/sectioning/in_menu_only_special_spaces_node.pl
@@ -1344,10 +1344,10 @@ File: ,  Node:           ,  Prev: ᠎ ,  Up: Top
 
 Tag Table:
 Node: Top64
-Node:    221
-Node: …  519
-Node: ᠎ 701
-Node:           881
+Node:    181
+Node: …  467
+Node: ᠎ 637
+Node:           785
 
 End Tag Table
 
diff --git a/tp/t/results/sectioning/in_menu_only_special_spaces_node_menu.pl 
b/tp/t/results/sectioning/in_menu_only_special_spaces_node_menu.pl
index 1578b1179e..c17e44ce1f 100644
--- a/tp/t/results/sectioning/in_menu_only_special_spaces_node_menu.pl
+++ b/tp/t/results/sectioning/in_menu_only_special_spaces_node_menu.pl
@@ -1344,10 +1344,10 @@ File: ,  Node:           ,  Prev: ᠎ ,  Up: Top
 
 Tag Table:
 Node: Top64
-Node:    221
-Node: …  519
-Node: ᠎ 701
-Node:           881
+Node:    181
+Node: …  467
+Node: ᠎ 637
+Node:           785
 
 End Tag Table
 
diff --git a/tp/t/results/sectioning/reference_to_only_special_spaces_node.pl 
b/tp/t/results/sectioning/reference_to_only_special_spaces_node.pl
index a622472a4c..53e751caf3 100644
--- a/tp/t/results/sectioning/reference_to_only_special_spaces_node.pl
+++ b/tp/t/results/sectioning/reference_to_only_special_spaces_node.pl
@@ -661,7 +661,7 @@ File: ,  Node:    ,  Next:    ,  Prev: Top,  Up: Top
 
 Tag Table:
 Node: Top69
-Node:    154
+Node:    142
 
 End Tag Table
 
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 0d2aa9bdc3..0d411b1d3a 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -567,6 +567,16 @@ sub convert_to_info($$$$$;$)
     = set_converter_option_defaults($converter_options,
                                     $main_configuration, $format);
 
+  # If not outputing to a file, do not do any encoding.  Return value from
+  # 'output' is an unencoded character string.  This will be encoded to
+  # UTF-8 in the results file.  This may make byte offsets in the tag table
+  # incorrect, so if those needed to be tested, an separate output file
+  # would have to be used instead.
+  if (defined($converter_options->{'OUTFILE'})
+      and $converter_options->{'OUTFILE'} eq '') {
+    $converter_options->{'OUTPUT_PERL_ENCODING'} = '';
+  }
+
   my $converter =
      Texinfo::Convert::Info->converter ({'DEBUG' => $self->{'DEBUG'},
                                          'document' => $document,



reply via email to

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