[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Makefile.tres, tp/t/xml_tests.t ($sectioning
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Makefile.tres, tp/t/xml_tests.t ($sectioning_test) (sectioning_test_ref, sectioning_test_no_use_nodes): add test of USE_NODES set in Texinfo XML. |
Date: |
Sat, 06 Apr 2024 06:34:47 -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 628c753c88 * tp/Makefile.tres, tp/t/xml_tests.t ($sectioning_test)
(sectioning_test_ref, sectioning_test_no_use_nodes): add test of USE_NODES set
in Texinfo XML.
628c753c88 is described below
commit 628c753c88d8f1be2256741e31f6a532b18ecbfc
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Apr 6 12:34:37 2024 +0200
* tp/Makefile.tres, tp/t/xml_tests.t ($sectioning_test)
(sectioning_test_ref, sectioning_test_no_use_nodes): add test of
USE_NODES set in Texinfo XML.
---
ChangeLog | 6 +
tp/Makefile.tres | 2 +
.../xml_tests/sectioning_test_no_use_nodes.pl | 595 ++++++++++++++++++++
tp/t/results/xml_tests/sectioning_test_ref.pl | 599 +++++++++++++++++++++
tp/t/xml_tests.t | 27 +
5 files changed, 1229 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index ef0ec1d8b1..49eafee7b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-04-06 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Makefile.tres, tp/t/xml_tests.t ($sectioning_test)
+ (sectioning_test_ref, sectioning_test_no_use_nodes): add test of
+ USE_NODES set in Texinfo XML.
+
2024-04-06 Patrice Dumas <pertusus@free.fr>
* doc/texinfo.texi (Other Formats Customization Variables): new node
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index a16c19f2aa..0b475e7218 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -2069,6 +2069,8 @@ test_files_generated_list =
$(test_tap_files_generated_list) \
t/results/xml_tests/macro_and_args.pl \
t/results/xml_tests/raw.pl \
t/results/xml_tests/raw_and_comments.pl \
+ t/results/xml_tests/sectioning_test_no_use_nodes.pl \
+ t/results/xml_tests/sectioning_test_ref.pl \
t/results/xml_tests/spaces_info_lost.pl \
t/results/xml_tests/top_node_and_bye.pl \
t/results/xml_tests/top_node_no_section.pl \
diff --git a/tp/t/results/xml_tests/sectioning_test_no_use_nodes.pl
b/tp/t/results/xml_tests/sectioning_test_no_use_nodes.pl
new file mode 100644
index 0000000000..fe193106c4
--- /dev/null
+++ b/tp/t/results/xml_tests/sectioning_test_no_use_nodes.pl
@@ -0,0 +1,595 @@
+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{'sectioning_test_no_use_nodes'} = {
+ 'contents' => [
+ {
+ 'type' => 'before_node_section'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Top'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'Top'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 1
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'top'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'top',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'In T.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {},
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 2
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'chap'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'chap'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 6
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Chap1'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'In c1.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {
+ 'section_number' => '1'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 7
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'sec'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'sec'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 11
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'sec1'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'section',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'In s1.1.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {
+ 'section_number' => '1.1'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 12
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'chap2'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'chap2'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 16
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Chap2'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'In c2.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ }
+ ],
+ 'extra' => {
+ 'section_number' => '2'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 17
+ }
+ }
+ ],
+ 'type' => 'document_root'
+};
+
+$result_texis{'sectioning_test_no_use_nodes'} = '@node Top
+@top top
+
+In T.
+
+@node chap
+@chapter Chap1
+
+In c1.
+
+@node sec
+@section sec1
+
+In s1.1.
+
+@node chap2
+@chapter Chap2
+
+In c2.
+';
+
+
+$result_texts{'sectioning_test_no_use_nodes'} = 'top
+***
+
+In T.
+
+1 Chap1
+*******
+
+In c1.
+
+1.1 sec1
+========
+
+In s1.1.
+
+2 Chap2
+*******
+
+In c2.
+';
+
+$result_sectioning{'sectioning_test_no_use_nodes'} = {
+ 'extra' => {
+ 'section_childs' => [
+ {
+ 'cmdname' => 'top',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+ },
+ 'section_childs' => [
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'chap'
+ }
+ },
+ 'section_childs' => [
+ {
+ 'cmdname' => 'section',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'sec'
+ }
+ },
+ 'section_directions' => {
+ 'up' => {}
+ },
+ 'section_level' => 2,
+ 'section_number' => '1.1'
+ }
+ }
+ ],
+ 'section_directions' => {
+ 'up' => {}
+ },
+ 'section_level' => 1,
+ 'section_number' => '1',
+ 'toplevel_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ }
+ }
+ },
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'chap2'
+ }
+ },
+ 'section_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ },
+ 'section_level' => 1,
+ 'section_number' => '2',
+ 'toplevel_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ }
+ }
+ }
+ ],
+ 'section_level' => 0,
+ 'sectioning_root' => {},
+ 'toplevel_directions' => {}
+ }
+ }
+ ],
+ 'section_level' => -1
+ }
+};
+$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
=
$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
=
$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'prev'}
=
$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'up'}
=
$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[1]{'extra'}{'section_directions'}{'prev'}
=
$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[1]{'extra'}{'section_directions'}{'up'}
=
$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[1]{'extra'}{'toplevel_directions'}{'prev'}
=
$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[1]{'extra'}{'toplevel_directions'}{'up'}
=
$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_no_use_nodes'}{'extra'}{'section_childs'}[0]{'extra'}{'sectioning_root'}
= $result_sectioning{'sectioning_test_no_use_nodes'};
+
+$result_nodes{'sectioning_test_no_use_nodes'} = [
+ {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'top',
+ 'extra' => {}
+ },
+ 'node_directions' => {
+ 'next' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'section_number' => '1'
+ }
+ },
+ 'node_directions' => {
+ 'next' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'section_number' => '2'
+ }
+ },
+ 'node_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ },
+ 'normalized' => 'chap2'
+ }
+ },
+ 'prev' => {},
+ 'up' => {}
+ },
+ 'normalized' => 'chap'
+ }
+ }
+ },
+ 'normalized' => 'Top'
+ }
+ },
+ {},
+ {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'section',
+ 'extra' => {
+ 'section_number' => '1.1'
+ }
+ },
+ 'node_directions' => {
+ 'up' => {}
+ },
+ 'normalized' => 'sec'
+ }
+ },
+ {}
+];
+$result_nodes{'sectioning_test_no_use_nodes'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
=
$result_nodes{'sectioning_test_no_use_nodes'}[0]{'extra'}{'node_directions'}{'next'};
+$result_nodes{'sectioning_test_no_use_nodes'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
= $result_nodes{'sectioning_test_no_use_nodes'}[0];
+$result_nodes{'sectioning_test_no_use_nodes'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
= $result_nodes{'sectioning_test_no_use_nodes'}[0];
+$result_nodes{'sectioning_test_no_use_nodes'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
= $result_nodes{'sectioning_test_no_use_nodes'}[0];
+$result_nodes{'sectioning_test_no_use_nodes'}[1] =
$result_nodes{'sectioning_test_no_use_nodes'}[0]{'extra'}{'node_directions'}{'next'};
+$result_nodes{'sectioning_test_no_use_nodes'}[2]{'extra'}{'node_directions'}{'up'}
=
$result_nodes{'sectioning_test_no_use_nodes'}[0]{'extra'}{'node_directions'}{'next'};
+$result_nodes{'sectioning_test_no_use_nodes'}[3] =
$result_nodes{'sectioning_test_no_use_nodes'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'next'};
+
+$result_menus{'sectioning_test_no_use_nodes'} = [
+ {
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+ },
+ {
+ 'extra' => {
+ 'normalized' => 'chap'
+ }
+ },
+ {
+ 'extra' => {
+ 'normalized' => 'sec'
+ }
+ },
+ {
+ 'extra' => {
+ 'normalized' => 'chap2'
+ }
+ }
+];
+
+$result_errors{'sectioning_test_no_use_nodes'} = [];
+
+
+$result_floats{'sectioning_test_no_use_nodes'} = {};
+
+
+
+$result_converted{'xml'}->{'sectioning_test_no_use_nodes'} = '<node name="Top"
spaces=" "><nodename>Top</nodename><nodenext automatic="on">chap</nodenext>
+</node><top spaces=" "><sectiontitle>top</sectiontitle></top>
+
+<para>In T.
+</para>
+<node name="chap" spaces=" "><nodename>chap</nodename><nodenext
automatic="on">chap2</nodenext><nodeprev automatic="on">Top</nodeprev><nodeup
automatic="on">Top</nodeup>
+</node><chapter spaces=" "><sectiontitle>Chap1</sectiontitle></chapter>
+
+<para>In c1.
+</para>
+<node name="sec" spaces=" "><nodename>sec</nodename><nodeup
automatic="on">chap</nodeup>
+</node><section spaces=" "><sectiontitle>sec1</sectiontitle></section>
+
+<para>In s1.1.
+</para>
+<node name="chap2" spaces=" "><nodename>chap2</nodename><nodeprev
automatic="on">chap</nodeprev><nodeup automatic="on">Top</nodeup>
+</node><chapter spaces=" "><sectiontitle>Chap2</sectiontitle></chapter>
+
+<para>In c2.
+</para>';
+
+1;
diff --git a/tp/t/results/xml_tests/sectioning_test_ref.pl
b/tp/t/results/xml_tests/sectioning_test_ref.pl
new file mode 100644
index 0000000000..580f0a324b
--- /dev/null
+++ b/tp/t/results/xml_tests/sectioning_test_ref.pl
@@ -0,0 +1,599 @@
+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{'sectioning_test_ref'} = {
+ 'contents' => [
+ {
+ 'type' => 'before_node_section'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Top'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'Top'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 1
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'top'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'top',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'In T.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {},
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 2
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'chap'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'chap'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 6
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Chap1'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'In c1.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {
+ 'section_number' => '1'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 7
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'sec'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'sec'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 11
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'sec1'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'section',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'In s1.1.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {
+ 'section_number' => '1.1'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 12
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'chap2'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'chap2'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 16
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Chap2'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'In c2.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ }
+ ],
+ 'extra' => {
+ 'section_number' => '2'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 17
+ }
+ }
+ ],
+ 'type' => 'document_root'
+};
+
+$result_texis{'sectioning_test_ref'} = '@node Top
+@top top
+
+In T.
+
+@node chap
+@chapter Chap1
+
+In c1.
+
+@node sec
+@section sec1
+
+In s1.1.
+
+@node chap2
+@chapter Chap2
+
+In c2.
+';
+
+
+$result_texts{'sectioning_test_ref'} = 'top
+***
+
+In T.
+
+1 Chap1
+*******
+
+In c1.
+
+1.1 sec1
+========
+
+In s1.1.
+
+2 Chap2
+*******
+
+In c2.
+';
+
+$result_sectioning{'sectioning_test_ref'} = {
+ 'extra' => {
+ 'section_childs' => [
+ {
+ 'cmdname' => 'top',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+ },
+ 'section_childs' => [
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'chap'
+ }
+ },
+ 'section_childs' => [
+ {
+ 'cmdname' => 'section',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'sec'
+ }
+ },
+ 'section_directions' => {
+ 'up' => {}
+ },
+ 'section_level' => 2,
+ 'section_number' => '1.1'
+ }
+ }
+ ],
+ 'section_directions' => {
+ 'up' => {}
+ },
+ 'section_level' => 1,
+ 'section_number' => '1',
+ 'toplevel_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ }
+ }
+ },
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'chap2'
+ }
+ },
+ 'section_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ },
+ 'section_level' => 1,
+ 'section_number' => '2',
+ 'toplevel_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ }
+ }
+ }
+ ],
+ 'section_level' => 0,
+ 'sectioning_root' => {},
+ 'toplevel_directions' => {}
+ }
+ }
+ ],
+ 'section_level' => -1
+ }
+};
+$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
=
$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
= $result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'prev'}
= $result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'up'}
= $result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[1]{'extra'}{'section_directions'}{'prev'}
=
$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[1]{'extra'}{'section_directions'}{'up'}
= $result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[1]{'extra'}{'toplevel_directions'}{'prev'}
=
$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[1]{'extra'}{'toplevel_directions'}{'up'}
= $result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'sectioning_test_ref'}{'extra'}{'section_childs'}[0]{'extra'}{'sectioning_root'}
= $result_sectioning{'sectioning_test_ref'};
+
+$result_nodes{'sectioning_test_ref'} = [
+ {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'top',
+ 'extra' => {}
+ },
+ 'node_directions' => {
+ 'next' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'section_number' => '1'
+ }
+ },
+ 'node_directions' => {
+ 'next' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'section_number' => '2'
+ }
+ },
+ 'node_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ },
+ 'normalized' => 'chap2'
+ }
+ },
+ 'prev' => {},
+ 'up' => {}
+ },
+ 'normalized' => 'chap'
+ }
+ }
+ },
+ 'normalized' => 'Top'
+ }
+ },
+ {},
+ {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'section',
+ 'extra' => {
+ 'section_number' => '1.1'
+ }
+ },
+ 'node_directions' => {
+ 'up' => {}
+ },
+ 'normalized' => 'sec'
+ }
+ },
+ {}
+];
+$result_nodes{'sectioning_test_ref'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
= $result_nodes{'sectioning_test_ref'}[0]{'extra'}{'node_directions'}{'next'};
+$result_nodes{'sectioning_test_ref'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
= $result_nodes{'sectioning_test_ref'}[0];
+$result_nodes{'sectioning_test_ref'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
= $result_nodes{'sectioning_test_ref'}[0];
+$result_nodes{'sectioning_test_ref'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
= $result_nodes{'sectioning_test_ref'}[0];
+$result_nodes{'sectioning_test_ref'}[1] =
$result_nodes{'sectioning_test_ref'}[0]{'extra'}{'node_directions'}{'next'};
+$result_nodes{'sectioning_test_ref'}[2]{'extra'}{'node_directions'}{'up'} =
$result_nodes{'sectioning_test_ref'}[0]{'extra'}{'node_directions'}{'next'};
+$result_nodes{'sectioning_test_ref'}[3] =
$result_nodes{'sectioning_test_ref'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'next'};
+
+$result_menus{'sectioning_test_ref'} = [
+ {
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+ },
+ {
+ 'extra' => {
+ 'normalized' => 'chap'
+ }
+ },
+ {
+ 'extra' => {
+ 'normalized' => 'sec'
+ }
+ },
+ {
+ 'extra' => {
+ 'normalized' => 'chap2'
+ }
+ }
+];
+
+$result_errors{'sectioning_test_ref'} = [];
+
+
+$result_floats{'sectioning_test_ref'} = {};
+
+
+
+$result_converted{'xml'}->{'sectioning_test_ref'} = '<node name="Top" spaces="
"><nodename>Top</nodename><nodenext automatic="on">chap</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+<para>In T.
+</para>
+</top>
+<node name="chap" spaces=" "><nodename>chap</nodename><nodenext
automatic="on">chap2</nodenext><nodeprev automatic="on">Top</nodeprev><nodeup
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Chap1</sectiontitle>
+
+<para>In c1.
+</para>
+<node name="sec" spaces=" "><nodename>sec</nodename><nodeup
automatic="on">chap</nodeup></node>
+<section spaces=" "><sectiontitle>sec1</sectiontitle>
+
+<para>In s1.1.
+</para>
+</section>
+</chapter>
+<node name="chap2" spaces=" "><nodename>chap2</nodename><nodeprev
automatic="on">chap</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Chap2</sectiontitle>
+
+<para>In c2.
+</para></chapter>
+';
+
+1;
diff --git a/tp/t/xml_tests.t b/tp/t/xml_tests.t
index 9bfb14a94d..b3fdfd5257 100644
--- a/tp/t/xml_tests.t
+++ b/tp/t/xml_tests.t
@@ -5,6 +5,27 @@ use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
require 't/test_utils.pl';
+my $sectioning_test = '@node Top
+@top top
+
+In T.
+
+@node chap
+@chapter Chap1
+
+In c1.
+
+@node sec
+@section sec1
+
+In s1.1.
+
+@node chap2
+@chapter Chap2
+
+In c2.
+';
+
my @test_cases = (
['image_inline_or_not',
'@image{A}
@@ -348,6 +369,12 @@ b}
Again with space @inlineifset{flag, }. After.
'],
+['sectioning_test_ref',
+$sectioning_test,
+],
+['sectioning_test_no_use_nodes',
+$sectioning_test, {}, {'USE_NODES' => 1,},
+],
);
foreach my $test (@test_cases) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Makefile.tres, tp/t/xml_tests.t ($sectioning_test) (sectioning_test_ref, sectioning_test_no_use_nodes): add test of USE_NODES set in Texinfo XML.,
Patrice Dumas <=
- Prev by Date:
[no subject]
- Next by Date:
branch master updated: * doc/texinfo.texi (Other Formats Customization Variables), tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), tp/Texinfo/options_data.txt, tp/t/xml_tests.t: add a new customization variable, TXI_MARKUP_NO_SECTION_EXTENT, to be used in TexinfoMarkup.pm instead of USE_NODES to avoid multiple significations for USE_NODES.
- Previous by thread:
master updated (43b0428310 -> fdf8cf9bff)
- Next by thread:
branch master updated: * doc/texinfo.texi (Other Formats Customization Variables), tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), tp/Texinfo/options_data.txt, tp/t/xml_tests.t: add a new customization variable, TXI_MARKUP_NO_SECTION_EXTENT, to be used in TexinfoMarkup.pm instead of USE_NODES to avoid multiple significations for USE_NODES.
- Index(es):