texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Add missing Changelog entry and update Makefile.t


From: Patrice Dumas
Subject: branch master updated: Add missing Changelog entry and update Makefile.tres. * tp/t/65linemacro.t, tp/Makefile.tres: add brace_command_not_closed, verb_not_closed and paragraph_no_paragraph tests.
Date: Sat, 01 Apr 2023 13:10:59 -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 fc97991dc2 Add missing Changelog entry and update Makefile.tres. * 
tp/t/65linemacro.t, tp/Makefile.tres: add brace_command_not_closed, 
verb_not_closed and paragraph_no_paragraph tests.
fc97991dc2 is described below

commit fc97991dc2a0006f7eefc604cc45b922eea92ff7
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Apr 1 19:10:16 2023 +0200

    Add missing Changelog entry and update Makefile.tres.
    * tp/t/65linemacro.t, tp/Makefile.tres: add brace_command_not_closed,
    verb_not_closed and paragraph_no_paragraph tests.
---
 ChangeLog                                          |   3 +
 tp/Makefile.tres                                   |   3 +
 tp/t/results/linemacro/brace_command_not_closed.pl | 214 +++++++++++
 tp/t/results/linemacro/paragraph_no_paragraph.pl   | 426 +++++++++++++++++++++
 tp/t/results/linemacro/verb_not_closed.pl          | 227 +++++++++++
 5 files changed, 873 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 48f6abd187..3d1af9c0ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
        command expansion at the end of input, call end_line to get new input
        corresponding to the linemacro command expansion.
 
+       * tp/t/65linemacro.t, tp/Makefile.tres: add brace_command_not_closed,
+       verb_not_closed and paragraph_no_paragraph tests.
+
 2023-03-28  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_end_line),
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index ca3ebfd69d..be1cdc6fbe 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -1206,6 +1206,7 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/layout/no_monolithic_only_toc_out.pl \
   t/results/layout/no_monolithic_only_toc_out/res_html \
   t/results/linemacro/api_doc_with_linemacro.pl \
+  t/results/linemacro/brace_command_not_closed.pl \
   t/results/linemacro/braces_after_text.pl \
   t/results/linemacro/empty_last_argument.pl \
   t/results/linemacro/last_argument_with_braces.pl \
@@ -1213,12 +1214,14 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/linemacro/nested_linemacro_calls.pl \
   t/results/linemacro/newline_and_continuation_in_brace.pl \
   t/results/linemacro/no_arguments.pl \
+  t/results/linemacro/paragraph_no_paragraph.pl \
   t/results/linemacro/protected_spaces_on_line.pl \
   t/results/linemacro/simple_nested_linemacro_calls.pl \
   t/results/linemacro/spaces_after_command_in_call.pl \
   t/results/linemacro/spaces_in_args.pl \
   t/results/linemacro/spaces_in_call.pl \
   t/results/linemacro/text_arguments.pl \
+  t/results/linemacro/verb_not_closed.pl \
   t/results/macro/arg_body_expansion_order.pl \
   t/results/macro/arg_not_closed.pl \
   t/results/macro/backslash_in_arg.pl \
diff --git a/tp/t/results/linemacro/brace_command_not_closed.pl 
b/tp/t/results/linemacro/brace_command_not_closed.pl
new file mode 100644
index 0000000000..c5fda0f4da
--- /dev/null
+++ b/tp/t/results/linemacro/brace_command_not_closed.pl
@@ -0,0 +1,214 @@
+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{'brace_command_not_closed'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'args' => [
+            {
+              'text' => 'mycommand',
+              'type' => 'macro_name'
+            },
+            {
+              'text' => 'a',
+              'type' => 'macro_arg'
+            },
+            {
+              'text' => 'b',
+              'type' => 'macro_arg'
+            },
+            {
+              'text' => 'c',
+              'type' => 'macro_arg'
+            }
+          ],
+          'cmdname' => 'linemacro',
+          'contents' => [
+            {
+              'text' => '\\a\\, \\b\\ \\c\\
+',
+              'type' => 'raw'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'linemacro'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'linemacro'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 3,
+                'macro' => ''
+              }
+            }
+          ],
+          'info' => {
+            'arg_line' => ' mycommand {a, b, c}
+'
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 1,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'args' => [
+                          {
+                            'contents' => [
+                              {
+                                'text' => 'in code
+'
+                              }
+                            ],
+                            'type' => 'brace_command_arg'
+                          }
+                        ],
+                        'cmdname' => 'code',
+                        'source_info' => {
+                          'file_name' => '',
+                          'line_nr' => 5,
+                          'macro' => ''
+                        }
+                      }
+                    ],
+                    'type' => 'line_arg'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'mycommand'
+                },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
+                'type' => 'linemacro_call'
+              },
+              'sourcemark_type' => 'linemacro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => '',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'in code
+'
+                    }
+                  ],
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'code',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 5,
+                'macro' => 'mycommand'
+              }
+            },
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'position' => 4,
+                  'sourcemark_type' => 'linemacro_expansion',
+                  'status' => 'end'
+                }
+              ],
+              'text' => ',  
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'brace_command_not_closed'} = '@linemacro mycommand {a, b, c}
+\\a\\, \\b\\ \\c\\
+@end linemacro
+
+@code{in code
+},  
+
+';
+
+
+$result_texts{'brace_command_not_closed'} = '
+in code
+,  
+
+';
+
+$result_errors{'brace_command_not_closed'} = [
+  {
+    'error_line' => '@code missing closing brace
+',
+    'file_name' => '',
+    'line_nr' => 5,
+    'macro' => '',
+    'text' => '@code missing closing brace',
+    'type' => 'error'
+  }
+];
+
+
+$result_floats{'brace_command_not_closed'} = {};
+
+
+1;
diff --git a/tp/t/results/linemacro/paragraph_no_paragraph.pl 
b/tp/t/results/linemacro/paragraph_no_paragraph.pl
new file mode 100644
index 0000000000..d74e119408
--- /dev/null
+++ b/tp/t/results/linemacro/paragraph_no_paragraph.pl
@@ -0,0 +1,426 @@
+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{'paragraph_no_paragraph'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'args' => [
+            {
+              'text' => 'mycommand',
+              'type' => 'macro_name'
+            },
+            {
+              'text' => 'a',
+              'type' => 'macro_arg'
+            },
+            {
+              'text' => 'b',
+              'type' => 'macro_arg'
+            },
+            {
+              'text' => 'c',
+              'type' => 'macro_arg'
+            }
+          ],
+          'cmdname' => 'linemacro',
+          'contents' => [
+            {
+              'text' => '\\a\\, \\b\\ \\c\\
+',
+              'type' => 'raw'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'linemacro'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'linemacro'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 3,
+                'macro' => ''
+              }
+            }
+          ],
+          'info' => {
+            'arg_line' => ' mycommand {a, b, c}
+'
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 1,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'cmdname' => '*'
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'args' => [
+                          {
+                            'contents' => [
+                              {
+                                'text' => 'aa'
+                              }
+                            ],
+                            'type' => 'brace_command_arg'
+                          }
+                        ],
+                        'cmdname' => 'anchor',
+                        'extra' => {
+                          'normalized' => 'aa'
+                        },
+                        'source_info' => {
+                          'file_name' => '',
+                          'line_nr' => 5,
+                          'macro' => ''
+                        }
+                      },
+                      {
+                        'extra' => {
+                          'def_role' => 'spaces'
+                        },
+                        'text' => ' ',
+                        'type' => 'spaces'
+                      },
+                      {
+                        'text' => 'definite'
+                      },
+                      {
+                        'extra' => {
+                          'def_role' => 'spaces'
+                        },
+                        'text' => ' ',
+                        'type' => 'spaces'
+                      },
+                      {
+                        'contents' => [
+                          {
+                            'text' => 'and'
+                          },
+                          {
+                            'extra' => {
+                              'def_role' => 'spaces'
+                            },
+                            'text' => ' ',
+                            'type' => 'spaces'
+                          },
+                          {
+                            'args' => [
+                              {
+                                'contents' => [
+                                  {
+                                    'text' => 'more'
+                                  }
+                                ],
+                                'type' => 'brace_command_arg'
+                              }
+                            ],
+                            'cmdname' => 'code',
+                            'source_info' => {
+                              'file_name' => '',
+                              'line_nr' => 5,
+                              'macro' => ''
+                            }
+                          }
+                        ],
+                        'type' => 'def_aggregate'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_after_argument' => {
+                        'text' => '
+'
+                      }
+                    },
+                    'type' => 'line_arg'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'mycommand'
+                },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
+                'type' => 'linemacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'linemacro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => ' '
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'aa'
+                }
+              ],
+              'type' => 'brace_command_arg'
+            }
+          ],
+          'cmdname' => 'anchor',
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 5,
+            'macro' => 'mycommand'
+          }
+        },
+        {
+          'contents' => [
+            {
+              'text' => ', definite and '
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'more'
+                    }
+                  ],
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'code',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 5,
+                'macro' => 'mycommand'
+              }
+            },
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'position' => 1,
+                  'sourcemark_type' => 'linemacro_expansion',
+                  'status' => 'end'
+                }
+              ],
+              'text' => '
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 2,
+                  'element' => {
+                    'args' => [
+                      {
+                        'contents' => [
+                          {
+                            'contents' => [
+                              {
+                                'text' => 'a'
+                              }
+                            ],
+                            'info' => {
+                              'spaces_after_argument' => {
+                                'text' => '
+'
+                              }
+                            },
+                            'type' => 'bracketed_arg'
+                          }
+                        ],
+                        'type' => 'line_arg'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'mycommand'
+                    },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'type' => 'linemacro_call'
+                  },
+                  'position' => 10,
+                  'sourcemark_type' => 'linemacro_expansion',
+                  'status' => 'start'
+                }
+              ],
+              'text' => 'Some text a
+'
+            },
+            {
+              'source_marks' => [
+                {
+                  'counter' => 2,
+                  'position' => 4,
+                  'sourcemark_type' => 'linemacro_expansion',
+                  'status' => 'end'
+                }
+              ],
+              'text' => ',  
+'
+            },
+            {
+              'text' => '  protected in '
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'the
+'
+                    },
+                    {
+                      'text' => ' call'
+                    }
+                  ],
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'var',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 8,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => '
+'
+            },
+            {
+              'text' => 'and after.
+'
+            }
+          ],
+          'type' => 'paragraph'
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'paragraph_no_paragraph'} = '@linemacro mycommand {a, b, c}
+\\a\\, \\b\\ \\c\\
+@end linemacro
+
+@* @anchor{aa}, definite and @code{more}
+
+Some text a
+,  
+  protected in @var{the
+ call}
+and after.
+';
+
+
+$result_texts{'paragraph_no_paragraph'} = '
+
+ , definite and more
+
+Some text a
+,  
+  protected in the
+ call
+and after.
+';
+
+$result_errors{'paragraph_no_paragraph'} = [
+  {
+    'error_line' => 'misplaced {
+',
+    'file_name' => '',
+    'line_nr' => 7,
+    'macro' => '',
+    'text' => 'misplaced {',
+    'type' => 'error'
+  },
+  {
+    'error_line' => 'misplaced }
+',
+    'file_name' => '',
+    'line_nr' => 8,
+    'macro' => '',
+    'text' => 'misplaced }',
+    'type' => 'error'
+  },
+  {
+    'error_line' => '@anchor `aa\' previously defined (possibly involving 
@mycommand)
+',
+    'file_name' => '',
+    'line_nr' => 5,
+    'macro' => 'mycommand',
+    'text' => '@anchor `aa\' previously defined',
+    'type' => 'error'
+  },
+  {
+    'continuation' => 1,
+    'error_line' => 'here is the previous definition as @anchor
+',
+    'file_name' => '',
+    'line_nr' => 5,
+    'macro' => '',
+    'text' => 'here is the previous definition as @anchor',
+    'type' => 'error'
+  }
+];
+
+
+$result_floats{'paragraph_no_paragraph'} = {};
+
+
+1;
diff --git a/tp/t/results/linemacro/verb_not_closed.pl 
b/tp/t/results/linemacro/verb_not_closed.pl
new file mode 100644
index 0000000000..799c8a22d5
--- /dev/null
+++ b/tp/t/results/linemacro/verb_not_closed.pl
@@ -0,0 +1,227 @@
+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{'verb_not_closed'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'args' => [
+            {
+              'text' => 'mycommand',
+              'type' => 'macro_name'
+            },
+            {
+              'text' => 'a',
+              'type' => 'macro_arg'
+            },
+            {
+              'text' => 'b',
+              'type' => 'macro_arg'
+            },
+            {
+              'text' => 'c',
+              'type' => 'macro_arg'
+            }
+          ],
+          'cmdname' => 'linemacro',
+          'contents' => [
+            {
+              'text' => '\\a\\, \\b\\ \\c\\
+',
+              'type' => 'raw'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'linemacro'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'linemacro'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 3,
+                'macro' => ''
+              }
+            }
+          ],
+          'info' => {
+            'arg_line' => ' mycommand {a, b, c}
+'
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 1,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'args' => [
+                          {
+                            'contents' => [
+                              {
+                                'text' => ' in verb
+',
+                                'type' => 'raw'
+                              },
+                              {
+                                'text' => '
+',
+                                'type' => 'raw'
+                              }
+                            ],
+                            'type' => 'brace_command_arg'
+                          }
+                        ],
+                        'cmdname' => 'verb',
+                        'info' => {
+                          'delimiter' => ':'
+                        },
+                        'source_info' => {
+                          'file_name' => '',
+                          'line_nr' => 5,
+                          'macro' => ''
+                        }
+                      }
+                    ],
+                    'type' => 'line_arg'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'mycommand'
+                },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
+                'type' => 'linemacro_call'
+              },
+              'sourcemark_type' => 'linemacro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => '',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => ' in verb
+',
+                      'type' => 'raw'
+                    },
+                    {
+                      'text' => '
+',
+                      'type' => 'raw'
+                    }
+                  ],
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'verb',
+              'info' => {
+                'delimiter' => ':'
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 6,
+                'macro' => 'mycommand'
+              }
+            },
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'position' => 4,
+                  'sourcemark_type' => 'linemacro_expansion',
+                  'status' => 'end'
+                }
+              ],
+              'text' => ',  
+'
+            }
+          ],
+          'type' => 'paragraph'
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'verb_not_closed'} = '@linemacro mycommand {a, b, c}
+\\a\\, \\b\\ \\c\\
+@end linemacro
+
+@verb{: in verb
+
+:},  
+';
+
+
+$result_texts{'verb_not_closed'} = '
+ in verb
+
+,  
+';
+
+$result_errors{'verb_not_closed'} = [
+  {
+    'error_line' => '@verb missing closing delimiter sequence: :}
+',
+    'file_name' => '',
+    'line_nr' => 5,
+    'macro' => '',
+    'text' => '@verb missing closing delimiter sequence: :}',
+    'type' => 'error'
+  }
+];
+
+
+$result_floats{'verb_not_closed'} = {};
+
+
+1;



reply via email to

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