texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sat, 25 Nov 2023 18:22:01 -0500 (EST)

branch: master
commit d0fefdd6791cf9dacf49a017d513e8987480c7c0
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Nov 25 23:24:15 2023 +0100

    * tp/Makefile.tres, tp/t/03coverage_braces.t
    (two_footnotes_in_nodes_separate_no_header): add test with special
    output unit, HEADERS == 0 and conversion through convert.
---
 ChangeLog                                          |   6 +
 tp/Makefile.tres                                   |   1 +
 tp/t/03coverage_braces.t                           |   5 +
 .../two_footnotes_in_nodes_separate_no_header.pl   | 872 +++++++++++++++++++++
 4 files changed, 884 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 48f4610b93..d71299909a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-11-25  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Makefile.tres, tp/t/03coverage_braces.t
+       (two_footnotes_in_nodes_separate_no_header): add test with special
+       output unit, HEADERS == 0 and conversion through convert.
+
 2023-11-25  Gavin Smith <gavinsmith0123@gmail.com>
 
        * tp/Texinfo/Convert/Plaintext.pm (_process_text):
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index 98c1121336..d46f256d9c 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -409,6 +409,7 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/coverage_braces/too_much_args.pl \
   t/results/coverage_braces/two_footnotes_in_nodes.pl \
   t/results/coverage_braces/two_footnotes_in_nodes_separate.pl \
+  t/results/coverage_braces/two_footnotes_in_nodes_separate_no_header.pl \
   t/results/coverage_braces/unknown_command_with_braces.pl \
   t/results/coverage_braces/unmatched_brace.pl \
   t/results/coverage_braces/uref_in_ref.pl \
diff --git a/tp/t/03coverage_braces.t b/tp/t/03coverage_braces.t
index b422291b56..888bed124d 100644
--- a/tp/t/03coverage_braces.t
+++ b/tp/t/03coverage_braces.t
@@ -247,6 +247,11 @@ $two_footnotes_in_nodes_text,
 '@footnotestyle separate
 '.$two_footnotes_in_nodes_text,
 , {'test_formats' => ['html', 'info'], 'full_document' => 1} ],
+['two_footnotes_in_nodes_separate_no_header',
+'@footnotestyle separate
+'.$two_footnotes_in_nodes_text,
+, {'test_formats' => ['html', 'info'], 'full_document' => 1},
+  {'HEADERS' => 0} ],
 # could be in @test_invalid too, but also allows to test what happens
 # to formatting with empty first email first argument
 ['empty_line_in_email',
diff --git 
a/tp/t/results/coverage_braces/two_footnotes_in_nodes_separate_no_header.pl 
b/tp/t/results/coverage_braces/two_footnotes_in_nodes_separate_no_header.pl
new file mode 100644
index 0000000000..243348e5b6
--- /dev/null
+++ b/tp/t/results/coverage_braces/two_footnotes_in_nodes_separate_no_header.pl
@@ -0,0 +1,872 @@
+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{'two_footnotes_in_nodes_separate_no_header'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'contents' => [
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'separate'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'footnotestyle',
+              'extra' => {
+                'misc_args' => [
+                  'separate'
+                ]
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 1,
+                'macro' => ''
+              }
+            }
+          ],
+          'type' => 'preamble_before_content'
+        }
+      ],
+      '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' => {
+        'file_name' => '',
+        'line_nr' => 2,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => '2 footnotes in 2 nodes'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'top',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'A'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'Footnote Top/1
+'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    },
+                    {
+                      'text' => '
+',
+                      'type' => 'empty_line'
+                    },
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'para2'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    }
+                  ],
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'footnote',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 5,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => '
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'B'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'Footnote Top/2
+'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    },
+                    {
+                      'text' => '
+',
+                      'type' => 'empty_line'
+                    },
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'para2'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    }
+                  ],
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'footnote',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 9,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => '
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'menu',
+          'contents' => [
+            {
+              'contents' => [
+                {
+                  'text' => '* ',
+                  'type' => 'menu_entry_leading_text'
+                },
+                {
+                  'contents' => [
+                    {
+                      'text' => 'chapter'
+                    }
+                  ],
+                  'extra' => {
+                    'node_content' => {
+                      'contents' => [
+                        {}
+                      ]
+                    },
+                    'normalized' => 'chapter'
+                  },
+                  'type' => 'menu_entry_node'
+                },
+                {
+                  'text' => '::',
+                  'type' => 'menu_entry_separator'
+                },
+                {
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => '
+'
+                        }
+                      ],
+                      'type' => 'preformatted'
+                    }
+                  ],
+                  'type' => 'menu_entry_description'
+                }
+              ],
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 14,
+                'macro' => ''
+              },
+              'type' => 'menu_entry'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'menu'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'menu'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 15,
+                'macro' => ''
+              }
+            }
+          ],
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 13,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'extra' => {},
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 3,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chapter'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'is_target' => 1,
+        'normalized' => 'chapter'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 17,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chapter'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'chapter',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'C'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'Footnote chapter/1
+'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    },
+                    {
+                      'text' => '
+',
+                      'type' => 'empty_line'
+                    },
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'para2'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    }
+                  ],
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'footnote',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 20,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => '
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'D'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'Footnote chapter/2
+'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    },
+                    {
+                      'text' => '
+',
+                      'type' => 'empty_line'
+                    },
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'para2'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    }
+                  ],
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'footnote',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 24,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => '
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'extra' => {
+        'section_number' => '1'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 18,
+        'macro' => ''
+      }
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'two_footnotes_in_nodes_separate_no_header'}{'contents'}[2]{'contents'}[5]{'contents'}[0]{'contents'}[1]{'extra'}{'node_content'}{'contents'}[0]
 = 
$result_trees{'two_footnotes_in_nodes_separate_no_header'}{'contents'}[2]{'contents'}[5]{'contents'}[0]{'contents'}[1]{'contents'}[0];
+
+$result_texis{'two_footnotes_in_nodes_separate_no_header'} = '@footnotestyle 
separate
+@node Top
+@top 2 footnotes in 2 nodes
+
+A@footnote{Footnote Top/1
+
+para2}
+
+B@footnote{Footnote Top/2
+
+para2}
+
+@menu
+* chapter::
+@end menu
+
+@node chapter
+@chapter chapter
+
+C@footnote{Footnote chapter/1
+
+para2}
+
+D@footnote{Footnote chapter/2
+
+para2}
+
+';
+
+
+$result_texts{'two_footnotes_in_nodes_separate_no_header'} = '2 footnotes in 2 
nodes
+**********************
+
+A
+
+B
+
+* chapter::
+
+1 chapter
+*********
+
+C
+
+D
+
+';
+
+$result_sectioning{'two_footnotes_in_nodes_separate_no_header'} = {
+  'extra' => {
+    'section_childs' => [
+      {
+        'cmdname' => 'top',
+        'extra' => {
+          'associated_node' => {
+            'cmdname' => 'node',
+            'extra' => {
+              'normalized' => 'Top'
+            }
+          },
+          'section_childs' => [
+            {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'associated_node' => {
+                  'cmdname' => 'node',
+                  'extra' => {
+                    'normalized' => 'chapter'
+                  }
+                },
+                'section_directions' => {
+                  'up' => {}
+                },
+                'section_level' => 1,
+                'section_number' => '1',
+                'toplevel_directions' => {
+                  'prev' => {},
+                  'up' => {}
+                }
+              }
+            }
+          ],
+          'section_level' => 0,
+          'sectioning_root' => {},
+          'toplevel_directions' => {}
+        }
+      }
+    ],
+    'section_level' => -1
+  }
+};
+$result_sectioning{'two_footnotes_in_nodes_separate_no_header'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
 = 
$result_sectioning{'two_footnotes_in_nodes_separate_no_header'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'two_footnotes_in_nodes_separate_no_header'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'prev'}
 = 
$result_sectioning{'two_footnotes_in_nodes_separate_no_header'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'two_footnotes_in_nodes_separate_no_header'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'up'}
 = 
$result_sectioning{'two_footnotes_in_nodes_separate_no_header'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'two_footnotes_in_nodes_separate_no_header'}{'extra'}{'section_childs'}[0]{'extra'}{'sectioning_root'}
 = $result_sectioning{'two_footnotes_in_nodes_separate_no_header'};
+
+$result_nodes{'two_footnotes_in_nodes_separate_no_header'} = [
+  {
+    'cmdname' => 'node',
+    'extra' => {
+      'associated_section' => {
+        'cmdname' => 'top',
+        'extra' => {}
+      },
+      'node_directions' => {
+        'next' => {
+          'cmdname' => 'node',
+          'extra' => {
+            'associated_section' => {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'section_number' => '1'
+              }
+            },
+            'node_directions' => {
+              'prev' => {},
+              'up' => {}
+            },
+            'normalized' => 'chapter'
+          }
+        }
+      },
+      'normalized' => 'Top'
+    }
+  },
+  {}
+];
+$result_nodes{'two_footnotes_in_nodes_separate_no_header'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
 = $result_nodes{'two_footnotes_in_nodes_separate_no_header'}[0];
+$result_nodes{'two_footnotes_in_nodes_separate_no_header'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
 = $result_nodes{'two_footnotes_in_nodes_separate_no_header'}[0];
+$result_nodes{'two_footnotes_in_nodes_separate_no_header'}[1] = 
$result_nodes{'two_footnotes_in_nodes_separate_no_header'}[0]{'extra'}{'node_directions'}{'next'};
+
+$result_menus{'two_footnotes_in_nodes_separate_no_header'} = [
+  {
+    'extra' => {
+      'menus' => [
+        {}
+      ],
+      'normalized' => 'Top'
+    }
+  },
+  {
+    'extra' => {
+      'menu_directions' => {
+        'up' => {}
+      },
+      'normalized' => 'chapter'
+    }
+  }
+];
+$result_menus{'two_footnotes_in_nodes_separate_no_header'}[1]{'extra'}{'menu_directions'}{'up'}
 = $result_menus{'two_footnotes_in_nodes_separate_no_header'}[0];
+
+$result_errors{'two_footnotes_in_nodes_separate_no_header'} = [];
+
+
+$result_floats{'two_footnotes_in_nodes_separate_no_header'} = {};
+
+
+
+$result_converted{'html'}->{'two_footnotes_in_nodes_separate_no_header'} = 
'<!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>2 footnotes in 2 nodes</title>
+
+<meta name="description" content="2 footnotes in 2 nodes">
+<meta name="keywords" content="2 footnotes in 2 nodes">
+<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">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+span:hover a.copiable-link {visibility: visible}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+<div class="top-level-extent" id="Top">
+<h1 class="top" id="g_t2-footnotes-in-2-nodes"><span>2 footnotes in 2 nodes<a 
class="copiable-link" href="#g_t2-footnotes-in-2-nodes"> &para;</a></span></h1>
+
+<p>A<a class="footnote" id="DOCF1" href="#FOOT1"><sup>1</sup></a>
+</p>
+<p>B<a class="footnote" id="DOCF2" href="#FOOT2"><sup>2</sup></a>
+</p>
+
+<ul class="mini-toc">
+<li><a href="#chapter" accesskey="1">chapter</a></li>
+</ul>
+<hr>
+<div class="chapter-level-extent" id="chapter">
+<h2 class="chapter" id="chapter-1"><span>1 chapter<a class="copiable-link" 
href="#chapter-1"> &para;</a></span></h2>
+
+<p>C<a class="footnote" id="DOCF3" href="#FOOT3"><sup>3</sup></a>
+</p>
+<p>D<a class="footnote" id="DOCF4" href="#FOOT4"><sup>4</sup></a>
+</p>
+<hr>
+</div>
+</div>
+<div class="element-footnotes" id="SEC_Footnotes">
+<h4 class="footnotes-heading">Footnotes</h4>
+
+<h5 class="footnote-body-heading"><a id="FOOT1" href="#DOCF1">(1)</a></h5>
+<p>Footnote Top/1
+</p>
+<p>para2</p>
+<h5 class="footnote-body-heading"><a id="FOOT2" href="#DOCF2">(2)</a></h5>
+<p>Footnote Top/2
+</p>
+<p>para2</p>
+<h5 class="footnote-body-heading"><a id="FOOT3" href="#DOCF3">(3)</a></h5>
+<p>Footnote chapter/1
+</p>
+<p>para2</p>
+<h5 class="footnote-body-heading"><a id="FOOT4" href="#DOCF4">(4)</a></h5>
+<p>Footnote chapter/2
+</p>
+<p>para2</p>
+</div>
+
+
+</body>
+</html>
+';
+
+
+$result_converted{'info'}->{'two_footnotes_in_nodes_separate_no_header'} = 
'This is , produced from .
+
+
+File: ,  Node: Top,  Next: chapter,  Up: (dir)
+
+2 footnotes in 2 nodes
+**********************
+
+A(1) (*note Top-Footnote-1::)
+
+   B(2) (*note Top-Footnote-2::)
+
+* Menu:
+
+* chapter::
+
+
+File: ,  Node: Top-Footnotes,  Up: Top
+
+   (1) Footnote Top/1
+
+   para2
+
+   (2) Footnote Top/2
+
+   para2
+
+
+File: ,  Node: chapter,  Prev: Top,  Up: Top
+
+1 chapter
+*********
+
+C(1) (*note chapter-Footnote-1::)
+
+   D(2) (*note chapter-Footnote-2::)
+
+
+File: ,  Node: chapter-Footnotes,  Up: chapter
+
+   (1) Footnote chapter/1
+
+   para2
+
+   (2) Footnote chapter/2
+
+   para2
+
+
+
+Tag Table:
+Node: Top27
+Node: Top-Footnotes211
+Ref: Top-Footnote-1253
+Ref: Top-Footnote-2286
+Node: chapter319
+Node: chapter-Footnotes461
+Ref: chapter-Footnote-1511
+Ref: chapter-Footnote-2548
+
+End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:
+';
+
+
+$result_converted{'plaintext'}->{'two_footnotes_in_nodes_separate_no_header'} 
= '2 footnotes in 2 nodes
+**********************
+
+A(1) (*note Top-Footnote-1::)
+
+   B(2) (*note Top-Footnote-2::)
+
+   (1) Footnote Top/1
+
+   para2
+
+   (2) Footnote Top/2
+
+   para2
+
+1 chapter
+*********
+
+C(1) (*note chapter-Footnote-1::)
+
+   D(2) (*note chapter-Footnote-2::)
+
+   (1) Footnote chapter/1
+
+   para2
+
+   (2) Footnote chapter/2
+
+   para2
+
+';
+
+
+$result_converted{'latex_text'}->{'two_footnotes_in_nodes_separate_no_header'} 
= '\\begin{document}
+\\label{anchor:Top}%
+\\chapter{{chapter}}
+\\label{anchor:chapter}%
+
+C\\footnote{Footnote chapter/1
+
+para2}
+
+D\\footnote{Footnote chapter/2
+
+para2}
+
+';
+
+1;



reply via email to

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