[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Common.pm (%default_parser_common_cu
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Common.pm (%default_parser_common_customization), tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): do not consider ENABLE_ENCODING to be a parser option. |
Date: |
Sat, 04 Sep 2021 18:00:33 -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 ab977ab * tp/Texinfo/Common.pm
(%default_parser_common_customization), tp/Texinfo/XS/parsetexi/Parsetexi.pm
(parser): do not consider ENABLE_ENCODING to be a parser option.
ab977ab is described below
commit ab977ab83c74cc30b7229b5b40c8ae6fb5e99adb
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Sep 5 00:00:23 2021 +0200
* tp/Texinfo/Common.pm (%default_parser_common_customization),
tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser):
do not consider ENABLE_ENCODING to be a parser option.
---
ChangeLog | 6 ++++++
tp/Texinfo/Common.pm | 4 ----
tp/Texinfo/XS/parsetexi/Parsetexi.pm | 8 ++------
tp/t/09indices.t | 6 ++----
tp/t/96moresectioning.t | 2 +-
tp/t/converters_tests.t | 10 ++++-----
tp/t/html_tests.t | 13 ++++++------
tp/t/results/indices/empty_string_index_entry.pl | 5 -----
tp/t/results/invalid_nestings/in_table.pl | 3 +--
tp/t/test_utils.pl | 26 +++++++++++++++++-------
10 files changed, 42 insertions(+), 41 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 45728b4..4e9a8a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2021-09-04 Patrice Dumas <pertusus@free.fr>
+ * tp/Texinfo/Common.pm (%default_parser_common_customization),
+ tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser):
+ do not consider ENABLE_ENCODING to be a parser option.
+
+2021-09-04 Patrice Dumas <pertusus@free.fr>
+
* t/test_utils.pl: add a test comparison on sorted
index entry sort strings for indices.
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 1012a92..e752591 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -108,10 +108,6 @@ my %default_parser_common_customization = (
'DEBUG' => 0, # if >= 10, tree is printed in texi2any.pl after parsing.
# If >= 100 tree is printed every line.
'FORMAT_MENU' => 'menu', # if not 'menu' no menu error related.
- # This is not used directly, but passed to Convert::Text through
- # Texinfo::Common::_convert_text_options
- 'ENABLE_ENCODING' => undef, # output accented and special characters
- # based on @documentencoding
);
# Customization variables obeyed only by the parser, and the default values.
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
index 6722248..332b2ee 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
@@ -65,10 +65,7 @@ sub parser (;$$)
reset_parser ();
if (defined($conf)) {
foreach my $key (keys (%$conf)) {
- # Copy conf to parser object. Not used in parser module itself
- # except to set {'info'}->{'novalidate'}
- # but some settings may be used elsewhere, especially in
- # Structuring.pm.
+ # Copy conf to parser object.
if ($key ne 'values' and ref($conf->{$key})) {
$parser->{$key} = dclone($conf->{$key});
} else {
@@ -116,8 +113,7 @@ sub parser (;$$)
set_debug($conf->{$key}) if $conf->{'key'};
} elsif ($key eq 'accept_internalvalue') {
set_accept_internalvalue();
- } elsif ($key eq 'ENABLE_ENCODING'
- or $key eq 'novalidate'
+ } elsif ($key eq 'novalidate'
or $key eq 'registrar') {
# no action needed
} else {
diff --git a/tp/t/09indices.t b/tp/t/09indices.t
index d018940..909dfa3 100644
--- a/tp/t/09indices.t
+++ b/tp/t/09indices.t
@@ -705,24 +705,22 @@ my @file_tests = (
@setfilename encoding_index_ascii.info
@documentencoding us-ascii
'.$encoding_index_text,
-{'ENABLE_ENCODING' => 0}, {'ENABLE_ENCODING' => 0}
+{'ENABLE_ENCODING' => 0}
],
['encoding_index_latin1',
undef,
{'test_file' => 'encoding_index_latin1.texi', 'ENABLE_ENCODING' => 0},
-{'ENABLE_ENCODING' => 0}
],
['encoding_index_utf8',
undef,
{'test_file' => 'encoding_index_utf8.texi', 'ENABLE_ENCODING' => 0},
-{'ENABLE_ENCODING' => 0}
],
['encoding_index_ascii_enable_encoding',
'
@setfilename encoding_index_ascii_enable_encoding.info
@documentencoding us-ascii
'.$encoding_index_text,
-{'ENABLE_ENCODING' => 1}, {'ENABLE_ENCODING' => 1}
+{'ENABLE_ENCODING' => 1},
],
['encoding_index_latin1_enable_encoding',
undef,
diff --git a/tp/t/96moresectioning.t b/tp/t/96moresectioning.t
index ecc74fc..5b32292 100644
--- a/tp/t/96moresectioning.t
+++ b/tp/t/96moresectioning.t
@@ -70,7 +70,7 @@ my @test_cases = (
undef,
# tests for node with directions after section
{'test_file' => 'sectioning.texi', 'CHECK_NORMAL_MENU_STRUCTURE' => 1},
- {'SPLIT' => 'chapter', 'FRAMES' => 1, 'CHECK_NORMAL_MENU_STRUCTURE' => 1}
+ {'SPLIT' => 'chapter', 'FRAMES' => 1}
],
['placed_things_before_element',
undef,
diff --git a/tp/t/converters_tests.t b/tp/t/converters_tests.t
index 68351ee..7c9e513 100644
--- a/tp/t/converters_tests.t
+++ b/tp/t/converters_tests.t
@@ -373,13 +373,13 @@ $latin1_accents_text
$weird_accents_text
],
['weird_accents_disable_encoding',
-$weird_accents_text, {}, {'ENABLE_ENCODING' => 0}
+$weird_accents_text, {'ENABLE_ENCODING' => 0}
],
['accent',
$accents_text
],
['accent_enable_encoding',
-$accents_text, {}, {'ENABLE_ENCODING' => 1}
+$accents_text, {'ENABLE_ENCODING' => 1}
],
['accent_with_text',
'@u{--a} @dotless{--b} @^{--@dotless{i}} @^{--@dotless{j}} @^{--a}
@@ -977,11 +977,11 @@ Macros that should not be defined: @mymacro{}.
@macroarg{with arg}.
my @html_text_cases = (
['accentenc_no_entity',
-$latin1_accents_text, {}, {'ENABLE_ENCODING' => 1,
- 'ENABLE_ENCODING_USE_ENTITY' => 0}
+$latin1_accents_text, {'ENABLE_ENCODING' => 1},
+ {'ENABLE_ENCODING_USE_ENTITY' => 0}
],
['accentenc_enable_encoding',
-$latin1_accents_text, {}, {'ENABLE_ENCODING' => 1}
+$latin1_accents_text, {'ENABLE_ENCODING' => 1}
],
['top_in_ref_keep_top',
$top_in_ref_text,
diff --git a/tp/t/html_tests.t b/tp/t/html_tests.t
index 0af2aa8..84e7edc 100644
--- a/tp/t/html_tests.t
+++ b/tp/t/html_tests.t
@@ -322,12 +322,12 @@ AA @^e --- -- \'` \'\' ``', {},
{'ENABLE_ENCODING_USE_ENTITY' => 0}],
['utf8_no_use_entity_enable_encoding',
'@documentencoding utf-8
-AA @^e --- -- \'` \'\' ``', {}, {'ENABLE_ENCODING' => 1,
- 'ENABLE_ENCODING_USE_ENTITY' => 0}],
+AA @^e --- -- \'` \'\' ``', {'ENABLE_ENCODING' => 1},
+ {'ENABLE_ENCODING_USE_ENTITY' => 0}],
['utf8_enable_encoding',
'@documentencoding utf-8
-AA @^e --- -- \'` \'\' ``', {}, {'ENABLE_ENCODING' => 1}],
+AA @^e --- -- \'` \'\' ``', {'ENABLE_ENCODING' => 1}],
['utf8_no_use_entity_no_use_iso',
'@documentencoding utf-8
@@ -336,7 +336,7 @@ AA @^e --- -- \'` \'\' ``', {},
{'ENABLE_ENCODING_USE_ENTITY' => 0,
['utf8_no_use_entity_enable_encoding_no_use_iso',
'@documentencoding utf-8
-AA @^e --- -- \'` \'\' ``', {}, {'ENABLE_ENCODING' => 1, 'USE_ISO' => 0,
+AA @^e --- -- \'` \'\' ``', {'ENABLE_ENCODING' => 1}, {'USE_ISO' => 0,
'ENABLE_ENCODING_USE_ENTITY' => 0}],
['utf8_enable_encoding_no_use_iso', # this one leads to transiliterated text as
# ENABLE_ENCODING_USE_ENTITY is set
@@ -344,8 +344,7 @@ AA @^e --- -- \'` \'\' ``', {}, {'ENABLE_ENCODING' => 1,
'USE_ISO' => 0,
# to utf-8 characters is not done
'@documentencoding utf-8
-AA @^e --- -- \'` \'\' ``', {}, {'ENABLE_ENCODING' => 1,
- 'USE_ISO' => 0}],
+AA @^e --- -- \'` \'\' ``', {'ENABLE_ENCODING' => 1}, {'USE_ISO' => 0}],
['ref_in_preformatted',
'@node Top
@@ -374,7 +373,7 @@ my @todo = (
@AA{} @~{@dotless{i}} @dotless{i}.
@equiv{}
@sc{@AA{} @~{@dotless{i}} @dotless{i}}.
-',{}, {'ENABLE_ENCODING' => 1}]
+',{'ENABLE_ENCODING' => 1}]
);
# test that the node name that goes in the redirection file is reproducible.
diff --git a/tp/t/results/indices/empty_string_index_entry.pl
b/tp/t/results/indices/empty_string_index_entry.pl
index d84ad31..6137cc8 100644
--- a/tp/t/results/indices/empty_string_index_entry.pl
+++ b/tp/t/results/indices/empty_string_index_entry.pl
@@ -803,11 +803,6 @@ $result_errors{'empty_string_index_entry'} = [
$result_floats{'empty_string_index_entry'} = {};
-$result_indices_sort_strings{'empty_string_index_entry'} = {
- 'fn' => []
-};
-
-
$result_converted{'info'}->{'empty_string_index_entry'} = 'This is , produced
from .
diff --git a/tp/t/results/invalid_nestings/in_table.pl
b/tp/t/results/invalid_nestings/in_table.pl
index 32cfdc2..4b8473f 100644
--- a/tp/t/results/invalid_nestings/in_table.pl
+++ b/tp/t/results/invalid_nestings/in_table.pl
@@ -1391,8 +1391,7 @@ $result_indices_sort_strings{'in_table'} = {
'2 index',
'index',
'index'
- ],
- 'vr' => []
+ ]
};
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 2a4603c..9183291 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -794,9 +794,19 @@ sub test($$)
# always set FORMAT_MENU to menu, which is the default for parser
my $added_main_configurations = {'FORMAT_MENU' => 'menu'};
- foreach my $structuring_option (('CHECK_NORMAL_MENU_STRUCTURE',
- 'ENABLE_ENCODING')) {
- if ($parser_options->{$structuring_option}) {
+
+ foreach my $structuring_and_converter_option (('ENABLE_ENCODING')) {
+ if (defined($parser_options->{$structuring_and_converter_option})) {
+ $added_main_configurations->{$structuring_and_converter_option}
+ = $parser_options->{$structuring_and_converter_option};
+ $converter_options->{$structuring_and_converter_option}
+ = $parser_options->{$structuring_and_converter_option};
+ delete $parser_options->{$structuring_and_converter_option};
+ }
+ }
+
+ foreach my $structuring_option (('CHECK_NORMAL_MENU_STRUCTURE')) {
+ if (defined($parser_options->{$structuring_option})) {
$added_main_configurations->{$structuring_option}
= $parser_options->{$structuring_option};
delete $parser_options->{$structuring_option};
@@ -919,10 +929,12 @@ sub test($$)
$merged_index_entries);
foreach my $index_name (keys(%$sorted_index_entries)) {
# index entries sort strings sorted in the order of the index entries
- $indices_sorted_sort_strings->{$index_name} = [];
- foreach my $index_entry (@{$sorted_index_entries->{$index_name}}) {
- push @{$indices_sorted_sort_strings->{$index_name}},
- $index_entries_sort_strings->{$index_entry};
+ if (scalar(@{$sorted_index_entries->{$index_name}})) {
+ $indices_sorted_sort_strings->{$index_name} = [];
+ foreach my $index_entry (@{$sorted_index_entries->{$index_name}}) {
+ push @{$indices_sorted_sort_strings->{$index_name}},
+ $index_entries_sort_strings->{$index_entry};
+ }
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Common.pm (%default_parser_common_customization), tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): do not consider ENABLE_ENCODING to be a parser option.,
Patrice Dumas <=