[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Makefile.am (test_files), tp/Makefile.tres,
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/html_tests.t: add filenameconflictwithspecialelement demonstrating conflict of redirection file with special element, wwhich needs customizing the special element file_string. |
Date: |
Wed, 11 Jan 2023 05:12:31 -0500 |
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 646c820e4c * tp/Makefile.am (test_files), tp/Makefile.tres,
tp/t/html_tests.t: add filenameconflictwithspecialelement demonstrating
conflict of redirection file with special element, wwhich needs customizing the
special element file_string.
646c820e4c is described below
commit 646c820e4c73b248dbb1f18708d1ca1870d95b39
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Jan 11 11:12:22 2023 +0100
* tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/html_tests.t:
add filenameconflictwithspecialelement demonstrating conflict of
redirection file with special element, wwhich needs customizing the
special element file_string.
---
ChangeLog | 7 +
tp/Makefile.am | 3 +-
tp/Makefile.tres | 2 +
tp/t/html_tests.t | 16 +
.../redirection_file_collision_with_special.init | 4 +
.../filenameconflictwithspecialelement.pl | 404 +++++++++++++++++++++
.../res_html/chap.html | 38 ++
.../filenameconflictwithspecialelement-fot.html | 39 ++
.../res_html/index.html | 44 +++
9 files changed, 556 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index e90e752e56..74ea4d2701 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-01-11 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/html_tests.t:
+ add filenameconflictwithspecialelement demonstrating conflict of
+ redirection file with special element, wwhich needs customizing the
+ special element file_string.
+
2023-01-11 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/HTML.pm (output): add context for node
diff --git a/tp/Makefile.am b/tp/Makefile.am
index b41a1d8094..b34d8ad586 100644
--- a/tp/Makefile.am
+++ b/tp/Makefile.am
@@ -171,7 +171,8 @@ test_files = \
t/init/misc_file_collision.init \
t/init/only_toc_out.init \
t/init/redefine_need.init \
- t/init/redirection_file_collision_with_user_def.init
+ t/init/redirection_file_collision_with_special.init \
+ t/init/redirection_file_collision_with_user_def.init \
t/init/special_element_customization.pm \
t/init/t2h_singular.init \
t/init/test_directions.init \
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index 9c66904a88..2fdf82da28 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -565,6 +565,8 @@ test_files_generated_list =
$(test_tap_files_generated_list) \
t/results/html_tests/file_name_conflict_with_user_defined/res_html \
t/results/html_tests/filenameconflictwithnonsplit.pl \
t/results/html_tests/filenameconflictwithnonsplit/res_html \
+ t/results/html_tests/filenameconflictwithspecialelement.pl \
+ t/results/html_tests/filenameconflictwithspecialelement/res_html \
t/results/html_tests/float_copying.pl \
t/results/html_tests/float_copying/res_html \
t/results/html_tests/footnotestyle_separate_html_text_no_monolithic.pl \
diff --git a/tp/t/html_tests.t b/tp/t/html_tests.t
index de4e7183bf..34130708d0 100644
--- a/tp/t/html_tests.t
+++ b/tp/t/html_tests.t
@@ -799,6 +799,22 @@ my @file_tests = (
', {'init_files' => ['redirection_file_collision_with_user_def.init']},
{'SPLIT' => 'chapter'},
],
+['filenameconflictwithspecialelement',
+'@node Top
+@top top
+
+@footnote{a footnote}
+
+@node chap
+@chapter chap
+
+Need 2 elements for separate footnotes.
+
+@anchor{filenameconflictwithspecialelement fot}
+
+', {'init_files' => ['redirection_file_collision_with_special.init']},
+ {'SPLIT' => 'node', 'footnotestyle' => 'separate'},
+],
# NOTE the result is incorrect, the first footnote text is at the
# end of the file but the link is towards the separate file.
# The manual states that the footnotestyle should be in the preamble,
diff --git a/tp/t/init/redirection_file_collision_with_special.init
b/tp/t/init/redirection_file_collision_with_special.init
new file mode 100644
index 0000000000..51354f4f13
--- /dev/null
+++ b/tp/t/init/redirection_file_collision_with_special.init
@@ -0,0 +1,4 @@
+
+# this is used to allow a collision with redirection file name, as with
+# the default with underscore there cannot be a collision.
+texinfo_register_special_element_info('file_string', 'footnotes', '-fot');
diff --git a/tp/t/results/html_tests/filenameconflictwithspecialelement.pl
b/tp/t/results/html_tests/filenameconflictwithspecialelement.pl
new file mode 100644
index 0000000000..29493af9f5
--- /dev/null
+++ b/tp/t/results/html_tests/filenameconflictwithspecialelement.pl
@@ -0,0 +1,404 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'filenameconflictwithspecialelement'} = {
+ 'contents' => [
+ {
+ 'type' => 'before_node_section'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Top'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'Top'
+ }
+ ],
+ 'normalized' => 'Top'
+ },
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'top'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'top',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'a footnote'
+ }
+ ],
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'brace_command_context'
+ }
+ ],
+ 'cmdname' => 'footnote',
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {},
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => ''
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'chap'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'chap'
+ }
+ ],
+ 'normalized' => 'chap'
+ },
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => ''
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'chap'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'Need 2 elements for separate footnotes.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'filenameconflictwithspecialelement fot'
+ }
+ ],
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'anchor',
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'filenameconflictwithspecialelement-fot'
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 11,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'spaces_after_close_brace'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {},
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 7,
+ 'macro' => ''
+ }
+ }
+ ],
+ 'type' => 'document_root'
+};
+$result_trees{'filenameconflictwithspecialelement'}{'contents'}[1]{'extra'}{'node_content'}[0]
=
$result_trees{'filenameconflictwithspecialelement'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'filenameconflictwithspecialelement'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
=
$result_trees{'filenameconflictwithspecialelement'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'filenameconflictwithspecialelement'}{'contents'}[3]{'extra'}{'node_content'}[0]
=
$result_trees{'filenameconflictwithspecialelement'}{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'filenameconflictwithspecialelement'}{'contents'}[3]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
=
$result_trees{'filenameconflictwithspecialelement'}{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'filenameconflictwithspecialelement'}{'contents'}[4]{'contents'}[3]{'extra'}{'node_content'}[0]
=
$result_trees{'filenameconflictwithspecialelement'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'}[0];
+
+$result_texis{'filenameconflictwithspecialelement'} = '@node Top
+@top top
+
+@footnote{a footnote}
+
+@node chap
+@chapter chap
+
+Need 2 elements for separate footnotes.
+
+@anchor{filenameconflictwithspecialelement fot}
+
+';
+
+
+$result_texts{'filenameconflictwithspecialelement'} = 'top
+***
+
+
+
+1 chap
+******
+
+Need 2 elements for separate footnotes.
+
+
+';
+
+$result_sectioning{'filenameconflictwithspecialelement'} = {
+ 'structure' => {
+ 'section_childs' => [
+ {
+ 'cmdname' => 'top',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ },
+ 'info' => {},
+ 'structure' => {}
+ }
+ },
+ 'info' => {},
+ 'structure' => {
+ 'section_childs' => [
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'chap'
+ },
+ 'info' => {},
+ 'structure' => {}
+ }
+ },
+ 'info' => {},
+ 'structure' => {
+ 'section_level' => 1,
+ 'section_number' => 1,
+ 'section_up' => {},
+ 'toplevel_prev' => {},
+ 'toplevel_up' => {}
+ }
+ }
+ ],
+ 'section_level' => 0,
+ 'section_up' => {}
+ }
+ }
+ ],
+ 'section_level' => -1
+ }
+};
+$result_sectioning{'filenameconflictwithspecialelement'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
=
$result_sectioning{'filenameconflictwithspecialelement'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'filenameconflictwithspecialelement'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_prev'}
=
$result_sectioning{'filenameconflictwithspecialelement'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'filenameconflictwithspecialelement'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_up'}
=
$result_sectioning{'filenameconflictwithspecialelement'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'filenameconflictwithspecialelement'}{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
= $result_sectioning{'filenameconflictwithspecialelement'};
+
+$result_nodes{'filenameconflictwithspecialelement'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'top',
+ 'extra' => {},
+ 'info' => {},
+ 'structure' => {}
+ },
+ 'normalized' => 'Top'
+ },
+ 'info' => {},
+ 'structure' => {
+ 'node_next' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {},
+ 'info' => {},
+ 'structure' => {
+ 'section_number' => 1
+ }
+ },
+ 'normalized' => 'chap'
+ },
+ 'info' => {},
+ 'structure' => {
+ 'node_prev' => {},
+ 'node_up' => {}
+ }
+ }
+ }
+};
+$result_nodes{'filenameconflictwithspecialelement'}{'structure'}{'node_next'}{'structure'}{'node_prev'}
= $result_nodes{'filenameconflictwithspecialelement'};
+$result_nodes{'filenameconflictwithspecialelement'}{'structure'}{'node_next'}{'structure'}{'node_up'}
= $result_nodes{'filenameconflictwithspecialelement'};
+
+$result_menus{'filenameconflictwithspecialelement'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ },
+ 'info' => {},
+ 'structure' => {}
+};
+
+$result_errors{'filenameconflictwithspecialelement'} = [];
+
+
+$result_floats{'filenameconflictwithspecialelement'} = {};
+
+
+$result_converted_errors{'file_html'}->{'filenameconflictwithspecialelement'}
= [
+ {
+ 'error_line' => 'warning: @anchor `filenameconflictwithspecialelement
fot\' file filenameconflictwithspecialelement-fot.html for redirection exists
+',
+ 'file_name' => '',
+ 'line_nr' => 11,
+ 'macro' => '',
+ 'text' => '@anchor `filenameconflictwithspecialelement fot\' file
filenameconflictwithspecialelement-fot.html for redirection exists',
+ 'type' => 'warning'
+ },
+ {
+ 'continuation' => 1,
+ 'error_line' => 'warning: conflict with footnotes special element
+',
+ 'text' => 'conflict with footnotes special element',
+ 'type' => 'warning'
+ }
+];
+
+
+1;
diff --git
a/tp/t/results/html_tests/filenameconflictwithspecialelement/res_html/chap.html
b/tp/t/results/html_tests/filenameconflictwithspecialelement/res_html/chap.html
new file mode 100644
index 0000000000..4d3781efbc
--- /dev/null
+++
b/tp/t/results/html_tests/filenameconflictwithspecialelement/res_html/chap.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>chap (top)</title>
+
+<meta name="description" content="chap (top)">
+<meta name="keywords" content="chap (top)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<link href="index.html" rel="up" title="Top">
+<link href="index.html" rel="prev" title="Top">
+
+
+</head>
+
+<body lang="en">
+<div class="chapter-level-extent" id="chap">
+<div class="nav-panel">
+<p>
+Previous: <a href="index.html" accesskey="p" rel="prev">top</a>, Up: <a
href="index.html" accesskey="u" rel="up">top</a> </p>
+</div>
+<hr>
+<h2 class="chapter" id="chap-1">1 chap</h2>
+
+<p>Need 2 elements for separate footnotes.
+</p>
+<a class="anchor" id="filenameconflictwithspecialelement-fot"></a>
+</div>
+
+
+
+</body>
+</html>
diff --git
a/tp/t/results/html_tests/filenameconflictwithspecialelement/res_html/filenameconflictwithspecialelement-fot.html
b/tp/t/results/html_tests/filenameconflictwithspecialelement/res_html/filenameconflictwithspecialelement-fot.html
new file mode 100644
index 0000000000..b63f7d0e68
--- /dev/null
+++
b/tp/t/results/html_tests/filenameconflictwithspecialelement/res_html/filenameconflictwithspecialelement-fot.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Footnotes (top)</title>
+
+<meta name="description" content="Footnotes (top)">
+<meta name="keywords" content="Footnotes (top)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+
+
+</head>
+
+<body lang="en">
+<div class="element-footnotes" id="SEC_Footnotes">
+<div class="nav-panel">
+<p>
+ </p>
+</div>
+<hr>
+<h4 class="footnotes-heading">Footnotes</h4>
+
+<h5 class="footnote-body-heading"><a id="FOOT1"
href="index.html#DOCF1">(1)</a></h5>
+<p>a footnote</p>
+</div><hr>
+<div class="nav-panel">
+<p>
+ </p>
+</div>
+
+
+
+</body>
+</html>
diff --git
a/tp/t/results/html_tests/filenameconflictwithspecialelement/res_html/index.html
b/tp/t/results/html_tests/filenameconflictwithspecialelement/res_html/index.html
new file mode 100644
index 0000000000..6302257931
--- /dev/null
+++
b/tp/t/results/html_tests/filenameconflictwithspecialelement/res_html/index.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Top (top)</title>
+
+<meta name="description" content="Top (top)">
+<meta name="keywords" content="Top (top)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="#Top" rel="start" title="Top">
+<link href="chap.html" rel="next" title="chap">
+
+
+</head>
+
+<body lang="en">
+<div class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+Next: <a href="chap.html" accesskey="n" rel="next">chap</a> </p>
+</div>
+<hr>
+<h1 class="top" id="top">top</h1>
+
+<p><a class="footnote" id="DOCF1"
href="filenameconflictwithspecialelement-fot.html#FOOT1"><sup>1</sup></a>
+</p>
+<ul class="mini-toc">
+<li><a href="chap.html" accesskey="1">chap</a></li>
+</ul>
+</div>
+<hr>
+<div class="nav-panel">
+<p>
+Next: <a href="chap.html" accesskey="n" rel="next">chap</a> </p>
+</div>
+
+
+
+</body>
+</html>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/html_tests.t: add filenameconflictwithspecialelement demonstrating conflict of redirection file with special element, wwhich needs customizing the special element file_string.,
Patrice Dumas <=