texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Makefile.tres, tp/t/03coverage_braces.t (foo


From: Patrice Dumas
Subject: branch master updated: * tp/Makefile.tres, tp/t/03coverage_braces.t (footnote_ending_on_empty_line_spaces): test with footnote with end line and spaces after end line before closing brace.
Date: Sun, 29 Sep 2024 08:09: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 ccc4bbf041 * tp/Makefile.tres, tp/t/03coverage_braces.t 
(footnote_ending_on_empty_line_spaces): test with footnote with end line and 
spaces after end line before closing brace.
ccc4bbf041 is described below

commit ccc4bbf041301030e77894a180d4d841033304ad
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jun 23 18:02:02 2024 +0200

    * tp/Makefile.tres, tp/t/03coverage_braces.t
    (footnote_ending_on_empty_line_spaces): test with footnote with end
    line and spaces after end line before closing brace.
    
    * tp/Makefile.tres, tp/t/08misc_commands.t
    (indent_with_command_after_without_space)
    (indent_with_text_after_without_space): tests with indent followed by
    command starting a paragraph or text (through a @value expansion)
    without space in-between.
---
 ChangeLog                                          |  12 ++
 tp/Makefile.tres                                   |   3 +
 tp/t/03coverage_braces.t                           |   3 +
 tp/t/08misc_commands.t                             |  10 ++
 .../footnote_ending_on_empty_line_spaces.pl        | 102 +++++++++++++
 .../indent_with_command_after_without_space.pl     | 117 +++++++++++++++
 .../indent_with_text_after_without_space.pl        | 160 +++++++++++++++++++++
 7 files changed, 407 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 7a67934fe4..3d9dc6ade4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-06-23  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Makefile.tres, tp/t/03coverage_braces.t
+       (footnote_ending_on_empty_line_spaces): test with footnote with end
+       line and spaces after end line before closing brace.
+
+       * tp/Makefile.tres, tp/t/08misc_commands.t
+       (indent_with_command_after_without_space)
+       (indent_with_text_after_without_space): tests with indent followed by
+       command starting a paragraph or text (through a @value expansion)
+       without space in-between.
+
 2024-06-23  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_merge_text),
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index 638d859165..411782348e 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -401,6 +401,7 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/coverage_braces/end_line_in_anchor.pl \
   t/results/coverage_braces/footnote.pl \
   t/results/coverage_braces/footnote_ending_on_empty_line.pl \
+  t/results/coverage_braces/footnote_ending_on_empty_line_spaces.pl \
   t/results/coverage_braces/footnote_in_command_not_closed.pl \
   t/results/coverage_braces/footnote_no_node.pl \
   t/results/coverage_braces/footnote_not_closed.pl \
@@ -1598,6 +1599,8 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/misc_commands/incorrect_allowcodebreaks_argument.pl \
   t/results/misc_commands/indent_in_command_in_paragraph.pl \
   t/results/misc_commands/indent_in_quotation.pl \
+  t/results/misc_commands/indent_with_command_after_without_space.pl \
+  t/results/misc_commands/indent_with_text_after_without_space.pl \
   t/results/misc_commands/index_entries.pl \
   t/results/misc_commands/invalid_clickstyle.pl \
   t/results/misc_commands/invalid_documentencoding.pl \
diff --git a/tp/t/03coverage_braces.t b/tp/t/03coverage_braces.t
index 1f6c461294..ae01b55b4f 100644
--- a/tp/t/03coverage_braces.t
+++ b/tp/t/03coverage_braces.t
@@ -114,6 +114,9 @@ ggg *}}.
 ['footnote_ending_on_empty_line','text@footnote{ in footnote.
 
 }'],
+['footnote_ending_on_empty_line_spaces','text@footnote{ in footnote.
+
+  }'],
 ['heading_in_footnote',
 'T@footnote{
 AAA
diff --git a/tp/t/08misc_commands.t b/tp/t/08misc_commands.t
index 4bef76cfe4..c72fc03871 100644
--- a/tp/t/08misc_commands.t
+++ b/tp/t/08misc_commands.t
@@ -305,6 +305,16 @@ qsd dsq sdq dsq dssdq sdq sdq sdq dsq sdq dsq dsq sdq dsq 
sdqsd q
 indent in quotation
 @end quotation
 '],
+['indent_with_command_after_without_space',
+'@indent@AA{} b
+'],
+# Need to use a trick such as @value to have a text following
+# @indent without being part of the command name
+['indent_with_text_after_without_space',
+'@set myvalue a
+
+@indent@value{myvalue} b
+'],
 ['noindent_after_smallexample',
 'To obtain.
 @smallexample
diff --git 
a/tp/t/results/coverage_braces/footnote_ending_on_empty_line_spaces.pl 
b/tp/t/results/coverage_braces/footnote_ending_on_empty_line_spaces.pl
new file mode 100644
index 0000000000..cecde36068
--- /dev/null
+++ b/tp/t/results/coverage_braces/footnote_ending_on_empty_line_spaces.pl
@@ -0,0 +1,102 @@
+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{'footnote_ending_on_empty_line_spaces'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'contents' => [
+            {
+              'text' => 'text'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'in footnote.
+'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    },
+                    {
+                      'text' => '
+',
+                      'type' => 'empty_line'
+                    },
+                    {
+                      'text' => '  ',
+                      'type' => 'spaces_before_paragraph'
+                    }
+                  ],
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'footnote',
+              'extra' => {},
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'line_nr' => 1
+              }
+            }
+          ],
+          'type' => 'paragraph'
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'footnote_ending_on_empty_line_spaces'} = 'text@footnote{ in 
footnote.
+
+  }';
+
+
+$result_texts{'footnote_ending_on_empty_line_spaces'} = 'text';
+
+$result_errors{'footnote_ending_on_empty_line_spaces'} = [];
+
+
+$result_floats{'footnote_ending_on_empty_line_spaces'} = {};
+
+
+
+$result_converted{'plaintext'}->{'footnote_ending_on_empty_line_spaces'} = 
'text(1)
+
+   ---------- Footnotes ----------
+
+   (1) in footnote.
+
+';
+
+
+$result_converted{'html_text'}->{'footnote_ending_on_empty_line_spaces'} = 
'<p>text<a class="footnote" id="DOCF1" href="#FOOT1"><sup>1</sup></a></p><div 
class="footnotes-segment">
+<hr>
+<h4 class="footnotes-heading">Footnotes</h4>
+
+<h5 class="footnote-body-heading"><a id="FOOT1" href="#DOCF1">(1)</a></h5>
+<p>in footnote.
+</p>
+</div>
+';
+
+
+$result_converted{'latex_text'}->{'footnote_ending_on_empty_line_spaces'} = 
'text\\footnote{in footnote.
+
+  }';
+
+1;
diff --git 
a/tp/t/results/misc_commands/indent_with_command_after_without_space.pl 
b/tp/t/results/misc_commands/indent_with_command_after_without_space.pl
new file mode 100644
index 0000000000..390756a26c
--- /dev/null
+++ b/tp/t/results/misc_commands/indent_with_command_after_without_space.pl
@@ -0,0 +1,117 @@
+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{'indent_with_command_after_without_space'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'cmdname' => 'indent',
+          'source_info' => {
+            'line_nr' => 1
+          }
+        },
+        {
+          'contents' => [
+            {
+              'args' => [
+                {
+                  'type' => 'brace_container'
+                }
+              ],
+              'cmdname' => 'AA',
+              'source_info' => {
+                'line_nr' => 1
+              }
+            },
+            {
+              'text' => ' b
+'
+            }
+          ],
+          'extra' => {
+            'indent' => 1
+          },
+          'type' => 'paragraph'
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'indent_with_command_after_without_space'} = '@indent@AA{} b
+';
+
+
+$result_texts{'indent_with_command_after_without_space'} = 'AA b
+';
+
+$result_errors{'indent_with_command_after_without_space'} = [];
+
+
+$result_floats{'indent_with_command_after_without_space'} = {};
+
+
+
+$result_converted{'plaintext'}->{'indent_with_command_after_without_space'} = 
'   Å b
+';
+
+
+$result_converted{'html_text'}->{'indent_with_command_after_without_space'} = 
'<p>&Aring; b
+</p>';
+
+
+$result_converted{'latex'}->{'indent_with_command_after_without_space'} = 
'\\documentclass{book}
+\\usepackage{amsfonts}
+\\usepackage{amsmath}
+\\usepackage[gen]{eurosym}
+\\usepackage{textcomp}
+\\usepackage{graphicx}
+\\usepackage{etoolbox}
+\\usepackage{titleps}
+\\usepackage[utf8]{inputenc}
+\\usepackage[T1]{fontenc}
+\\usepackage{float}
+% use hidelinks to remove boxes around links to be similar to Texinfo TeX
+\\usepackage[hidelinks]{hyperref}
+
+\\makeatletter
+\\newcommand{\\Texinfosettitle}{No Title}%
+
+% redefine the \\mainmatter command such that it does not clear page
+% as if in double page
+\\renewcommand\\mainmatter{\\clearpage\\@mainmattertrue\\pagenumbering{arabic}}
+\\newenvironment{Texinfopreformatted}{%
+  
\\par\\GNUTobeylines\\obeyspaces\\frenchspacing\\parskip=\\z@\\parindent=\\z@}{}
+{\\catcode`\\^^M=13 \\gdef\\GNUTobeylines{\\catcode`\\^^M=13 
\\def^^M{\\null\\par}}}
+\\newenvironment{Texinfoindented}{\\begin{list}{}{}\\item\\relax}{\\end{list}}
+
+% used for substitutions in commands
+\\newcommand{\\Texinfoplaceholder}[1]{}
+
+\\newpagestyle{single}{\\sethead[\\chaptername{} \\thechapter{} 
\\chaptertitle{}][][\\thepage]
+                              {\\chaptername{} \\thechapter{} 
\\chaptertitle{}}{}{\\thepage}}
+
+% allow line breaking at underscore
+\\let\\Texinfounderscore\\_
+\\renewcommand{\\_}{\\Texinfounderscore\\discretionary{}{}{}}
+\\renewcommand{\\includegraphics}[1]{\\fbox{FIG \\detokenize{#1}}}
+
+\\makeatother
+% set default for @setchapternewpage
+\\makeatletter
+\\patchcmd{\\chapter}{\\if@openright\\cleardoublepage\\else\\clearpage\\fi}{\\Texinfoplaceholder{setchapternewpage
 placeholder}\\clearpage}{}{}
+\\makeatother
+\\pagestyle{single}%
+
+\\AA{} b
+\\end{document}
+';
+
+1;
diff --git a/tp/t/results/misc_commands/indent_with_text_after_without_space.pl 
b/tp/t/results/misc_commands/indent_with_text_after_without_space.pl
new file mode 100644
index 0000000000..a437bdea4a
--- /dev/null
+++ b/tp/t/results/misc_commands/indent_with_text_after_without_space.pl
@@ -0,0 +1,160 @@
+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{'indent_with_text_after_without_space'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'args' => [
+            {
+              'text' => 'myvalue',
+              'type' => 'rawline_arg'
+            },
+            {
+              'text' => 'a',
+              'type' => 'rawline_arg'
+            }
+          ],
+          'cmdname' => 'set',
+          'info' => {
+            'arg_line' => ' myvalue a
+'
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'cmdname' => 'indent',
+          'source_info' => {
+            'line_nr' => 3
+          }
+        },
+        {
+          'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'contents' => [
+                          {
+                            'text' => 'myvalue'
+                          }
+                        ],
+                        'type' => 'brace_container'
+                      }
+                    ],
+                    'cmdname' => 'value'
+                  },
+                  'line' => 'a',
+                  'sourcemark_type' => 'value_expansion',
+                  'status' => 'start'
+                },
+                {
+                  'counter' => 1,
+                  'position' => 1,
+                  'sourcemark_type' => 'value_expansion',
+                  'status' => 'end'
+                }
+              ],
+              'text' => 'a b
+'
+            }
+          ],
+          'extra' => {
+            'indent' => 1
+          },
+          'type' => 'paragraph'
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'indent_with_text_after_without_space'} = '@set myvalue a
+
+@indenta b
+';
+
+
+$result_texts{'indent_with_text_after_without_space'} = '
+a b
+';
+
+$result_errors{'indent_with_text_after_without_space'} = [];
+
+
+$result_floats{'indent_with_text_after_without_space'} = {};
+
+
+
+$result_converted{'plaintext'}->{'indent_with_text_after_without_space'} = '   
a b
+';
+
+
+$result_converted{'html_text'}->{'indent_with_text_after_without_space'} = '
+<p>a b
+</p>';
+
+
+$result_converted{'latex'}->{'indent_with_text_after_without_space'} = 
'\\documentclass{book}
+\\usepackage{amsfonts}
+\\usepackage{amsmath}
+\\usepackage[gen]{eurosym}
+\\usepackage{textcomp}
+\\usepackage{graphicx}
+\\usepackage{etoolbox}
+\\usepackage{titleps}
+\\usepackage[utf8]{inputenc}
+\\usepackage[T1]{fontenc}
+\\usepackage{float}
+% use hidelinks to remove boxes around links to be similar to Texinfo TeX
+\\usepackage[hidelinks]{hyperref}
+
+\\makeatletter
+\\newcommand{\\Texinfosettitle}{No Title}%
+
+% redefine the \\mainmatter command such that it does not clear page
+% as if in double page
+\\renewcommand\\mainmatter{\\clearpage\\@mainmattertrue\\pagenumbering{arabic}}
+\\newenvironment{Texinfopreformatted}{%
+  
\\par\\GNUTobeylines\\obeyspaces\\frenchspacing\\parskip=\\z@\\parindent=\\z@}{}
+{\\catcode`\\^^M=13 \\gdef\\GNUTobeylines{\\catcode`\\^^M=13 
\\def^^M{\\null\\par}}}
+\\newenvironment{Texinfoindented}{\\begin{list}{}{}\\item\\relax}{\\end{list}}
+
+% used for substitutions in commands
+\\newcommand{\\Texinfoplaceholder}[1]{}
+
+\\newpagestyle{single}{\\sethead[\\chaptername{} \\thechapter{} 
\\chaptertitle{}][][\\thepage]
+                              {\\chaptername{} \\thechapter{} 
\\chaptertitle{}}{}{\\thepage}}
+
+% allow line breaking at underscore
+\\let\\Texinfounderscore\\_
+\\renewcommand{\\_}{\\Texinfounderscore\\discretionary{}{}{}}
+\\renewcommand{\\includegraphics}[1]{\\fbox{FIG \\detokenize{#1}}}
+
+\\makeatother
+% set default for @setchapternewpage
+\\makeatletter
+\\patchcmd{\\chapter}{\\if@openright\\cleardoublepage\\else\\clearpage\\fi}{\\Texinfoplaceholder{setchapternewpage
 placeholder}\\clearpage}{}{}
+\\makeatother
+\\pagestyle{single}%
+
+
+a b
+\\end{document}
+';
+
+1;



reply via email to

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