texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/t/65linemacro.t (end_conditional_in_linemacr


From: Patrice Dumas
Subject: branch master updated: * tp/t/65linemacro.t (end_conditional_in_linemacro) (begin_conditional_in_linemacro, block_begin_end_in_linemacro_call): add another conditional test in end_conditional_in_linemacro, add begin_conditional_in_linemacro and block_begin_end_in_linemacro_call similar tests.
Date: Thu, 20 Jul 2023 06:26:45 -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 6dda4cc1c9 * tp/t/65linemacro.t (end_conditional_in_linemacro) 
(begin_conditional_in_linemacro, block_begin_end_in_linemacro_call): add 
another conditional test in end_conditional_in_linemacro, add 
begin_conditional_in_linemacro and block_begin_end_in_linemacro_call similar 
tests.
6dda4cc1c9 is described below

commit 6dda4cc1c94034d3abaaebe68db24ab6c6ff7b95
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jul 20 12:26:35 2023 +0200

    * tp/t/65linemacro.t (end_conditional_in_linemacro)
    (begin_conditional_in_linemacro, block_begin_end_in_linemacro_call):
    add another conditional test in end_conditional_in_linemacro, add
    begin_conditional_in_linemacro and block_begin_end_in_linemacro_call
    similar tests.
---
 ChangeLog                                          |    8 +
 tp/Makefile.tres                                   |    2 +
 tp/t/65linemacro.t                                 |   62 ++
 .../linemacro/begin_conditional_in_linemacro.pl    |  364 +++++++
 .../linemacro/block_begin_end_in_linemacro_call.pl | 1093 ++++++++++++++++++++
 .../linemacro/end_conditional_in_linemacro.pl      |  105 +-
 6 files changed, 1631 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2d2fcdee88..4eacfc722a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-07-20  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/t/65linemacro.t (end_conditional_in_linemacro)
+       (begin_conditional_in_linemacro, block_begin_end_in_linemacro_call):
+       add another conditional test in end_conditional_in_linemacro, add
+       begin_conditional_in_linemacro and block_begin_end_in_linemacro_call
+       similar tests.
+
 2023-07-20  Patrice Dumas  <pertusus@free.fr>
 
        * tp/t/65linemacro.t (recursive_linemacro_in_call): new test.
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index c7ffbb2a9e..a8acb75e34 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -1212,6 +1212,8 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/layout/no_monolithic_only_toc_out/res_html \
   t/results/linemacro/api_doc_with_linemacro.pl \
   t/results/linemacro/arobase_brace_in_linemacro_call.pl \
+  t/results/linemacro/begin_conditional_in_linemacro.pl \
+  t/results/linemacro/block_begin_end_in_linemacro_call.pl \
   t/results/linemacro/blockitem_no_item.pl \
   t/results/linemacro/brace_command_not_closed.pl \
   t/results/linemacro/braces_after_text.pl \
diff --git a/tp/t/65linemacro.t b/tp/t/65linemacro.t
index ecb6e1fb0f..70b61cc6b7 100644
--- a/tp/t/65linemacro.t
+++ b/tp/t/65linemacro.t
@@ -318,6 +318,68 @@ inside {\a\ operator \b\}
 @ifclear aa
 @lm {text
   @end ifclear}
+
+@ifset b
+@lm {text
+@end ifset}
+
+'],
+['begin_conditional_in_linemacro',
+'@linemacro lm {a}
+b \a\ a
+@end linemacro
+
+@lm {
+@ifset}
+in ifset
+@end ifset
+
+@lm {
+@ifclear}
+in ifclear
+@end ifclear
+'],
+['block_begin_end_in_linemacro_call',
+'@linemacro lm {a}
+b \a\ a
+@end linemacro
+
+@lm {
+@quotation aa
+in quotation
+}
+@end quotation
+
+@quotation hh
+@lm {
+@end quotation
+
+}
+
+@lm {
+@quotation}
+in quotation
+
+aa.
+@end quotation
+
+@lm {
+@ignore
+ignored }
+still ignored
+@end ignore
+
+@lm {
+@macro mymac {e, f}
+args \e\|\f\|
+@defline @lm {\e\} {\f\}
+}
+@end macro
+
+@defblock
+@mymac{arg1, arg2}
+@end defblock
+
 '],
 ['call_macro_in_linemacro_body',
 '@linemacro lm {a, b}
diff --git a/tp/t/results/linemacro/begin_conditional_in_linemacro.pl 
b/tp/t/results/linemacro/begin_conditional_in_linemacro.pl
new file mode 100644
index 0000000000..9b0468d8e1
--- /dev/null
+++ b/tp/t/results/linemacro/begin_conditional_in_linemacro.pl
@@ -0,0 +1,364 @@
+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{'begin_conditional_in_linemacro'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'args' => [
+            {
+              'text' => 'lm',
+              'type' => 'macro_name'
+            },
+            {
+              'text' => 'a',
+              'type' => 'macro_arg'
+            }
+          ],
+          'cmdname' => 'linemacro',
+          'contents' => [
+            {
+              'text' => 'b \\a\\ a
+',
+              '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' => ' lm {a}
+'
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 1,
+            'macro' => ''
+          }
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'text' => '
+@ifset',
+                        'type' => 'bracketed_arg'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    }
+                  }
+                ],
+                'extra' => {
+                  'name' => 'lm'
+                },
+                'type' => 'linemacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'linemacro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'contents' => [
+                          {
+                            'source_marks' => [
+                              {
+                                'counter' => 1,
+                                'position' => 1,
+                                'sourcemark_type' => 'linemacro_expansion',
+                                'status' => 'end'
+                              }
+                            ],
+                            'text' => 'a'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_after_argument' => {
+                            'text' => '
+'
+                          }
+                        },
+                        'type' => 'block_line_arg'
+                      }
+                    ],
+                    'cmdname' => 'ifset',
+                    'contents' => [
+                      {
+                        'text' => 'in ifset
+',
+                        'type' => 'raw'
+                      },
+                      {
+                        'args' => [
+                          {
+                            'contents' => [
+                              {
+                                'text' => 'ifset'
+                              }
+                            ],
+                            'info' => {
+                              'spaces_after_argument' => {
+                                'text' => '
+'
+                              }
+                            },
+                            'type' => 'line_arg'
+                          }
+                        ],
+                        'cmdname' => 'end',
+                        'extra' => {
+                          'text_arg' => 'ifset'
+                        },
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'source_info' => {
+                          'file_name' => '',
+                          'line_nr' => 8,
+                          'macro' => ''
+                        }
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'source_info' => {
+                      'file_name' => '',
+                      'line_nr' => 6,
+                      'macro' => 'lm'
+                    }
+                  },
+                  'position' => 3,
+                  'sourcemark_type' => 'ignored_conditional_block'
+                }
+              ],
+              'text' => 'b 
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'text' => '
+@ifclear',
+                        'type' => 'bracketed_arg'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    }
+                  }
+                ],
+                'extra' => {
+                  'name' => 'lm'
+                },
+                'type' => 'linemacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'linemacro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'contents' => [
+                          {
+                            'source_marks' => [
+                              {
+                                'counter' => 2,
+                                'position' => 1,
+                                'sourcemark_type' => 'linemacro_expansion',
+                                'status' => 'end'
+                              }
+                            ],
+                            'text' => 'a'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_after_argument' => {
+                            'text' => '
+'
+                          }
+                        },
+                        'type' => 'block_line_arg'
+                      }
+                    ],
+                    'cmdname' => 'ifclear',
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'source_info' => {
+                      'file_name' => '',
+                      'line_nr' => 11,
+                      'macro' => 'lm'
+                    }
+                  },
+                  'position' => 3,
+                  'sourcemark_type' => 'expanded_conditional_command',
+                  'status' => 'start'
+                }
+              ],
+              'text' => 'b 
+'
+            },
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'contents' => [
+                          {
+                            'text' => 'ifclear'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_after_argument' => {
+                            'text' => '
+'
+                          }
+                        },
+                        'type' => 'line_arg'
+                      }
+                    ],
+                    'cmdname' => 'end',
+                    'extra' => {
+                      'text_arg' => 'ifclear'
+                    },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'source_info' => {
+                      'file_name' => '',
+                      'line_nr' => 13,
+                      'macro' => ''
+                    }
+                  },
+                  'position' => 11,
+                  'sourcemark_type' => 'expanded_conditional_command',
+                  'status' => 'end'
+                }
+              ],
+              'text' => 'in ifclear
+'
+            }
+          ],
+          'type' => 'paragraph'
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'begin_conditional_in_linemacro'} = '@linemacro lm {a}
+b \\a\\ a
+@end linemacro
+
+b 
+
+b 
+in ifclear
+';
+
+
+$result_texts{'begin_conditional_in_linemacro'} = '
+b 
+
+b 
+in ifclear
+';
+
+$result_errors{'begin_conditional_in_linemacro'} = [];
+
+
+$result_floats{'begin_conditional_in_linemacro'} = {};
+
+
+1;
diff --git a/tp/t/results/linemacro/block_begin_end_in_linemacro_call.pl 
b/tp/t/results/linemacro/block_begin_end_in_linemacro_call.pl
new file mode 100644
index 0000000000..e7495c0f40
--- /dev/null
+++ b/tp/t/results/linemacro/block_begin_end_in_linemacro_call.pl
@@ -0,0 +1,1093 @@
+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{'block_begin_end_in_linemacro_call'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'args' => [
+            {
+              'text' => 'lm',
+              'type' => 'macro_name'
+            },
+            {
+              'text' => 'a',
+              'type' => 'macro_arg'
+            }
+          ],
+          'cmdname' => 'linemacro',
+          'contents' => [
+            {
+              'text' => 'b \\a\\ a
+',
+              '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' => ' lm {a}
+'
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 1,
+            'macro' => ''
+          }
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'text' => '
+@quotation aa
+in quotation
+',
+                        'type' => 'bracketed_arg'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    }
+                  }
+                ],
+                'extra' => {
+                  'name' => 'lm'
+                },
+                'type' => 'linemacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'linemacro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'b 
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'aa'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'quotation',
+          'contents' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'in quotation
+'
+                },
+                {
+                  'source_marks' => [
+                    {
+                      'counter' => 1,
+                      'position' => 2,
+                      'sourcemark_type' => 'linemacro_expansion',
+                      'status' => 'end'
+                    }
+                  ],
+                  'text' => ' a
+'
+                }
+              ],
+              'type' => 'paragraph'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'quotation'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'quotation'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 9,
+                'macro' => ''
+              }
+            }
+          ],
+          'info' => {
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 8,
+            'macro' => 'lm'
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'hh'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'quotation',
+          'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 2,
+                  'element' => {
+                    'args' => [
+                      {
+                        'contents' => [
+                          {
+                            'text' => '
+@end quotation
+
+',
+                            'type' => 'bracketed_arg'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        }
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'lm'
+                    },
+                    'type' => 'linemacro_call'
+                  },
+                  'sourcemark_type' => 'linemacro_expansion',
+                  'status' => 'start'
+                }
+              ],
+              'text' => ''
+            },
+            {
+              'contents' => [
+                {
+                  'text' => 'b 
+'
+                }
+              ],
+              'type' => 'paragraph'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'quotation'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'quotation'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 15,
+                'macro' => 'lm'
+              }
+            }
+          ],
+          'info' => {
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 11,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'text' => ' ',
+          'type' => 'spaces_before_paragraph'
+        },
+        {
+          'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 2,
+                  'position' => 1,
+                  'sourcemark_type' => 'linemacro_expansion',
+                  'status' => 'end'
+                }
+              ],
+              'text' => 'a
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 3,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'text' => '
+@quotation',
+                        'type' => 'bracketed_arg'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    }
+                  }
+                ],
+                'extra' => {
+                  'name' => 'lm'
+                },
+                'type' => 'linemacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'linemacro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'b 
+'
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'source_marks' => [
+                    {
+                      'counter' => 3,
+                      'position' => 1,
+                      'sourcemark_type' => 'linemacro_expansion',
+                      'status' => 'end'
+                    }
+                  ],
+                  'text' => 'a'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'quotation',
+          'contents' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'in quotation
+'
+                }
+              ],
+              'type' => 'paragraph'
+            },
+            {
+              'text' => '
+',
+              'type' => 'empty_line'
+            },
+            {
+              'contents' => [
+                {
+                  'text' => 'aa.
+'
+                }
+              ],
+              'type' => 'paragraph'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'quotation'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'quotation'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 22,
+                'macro' => ''
+              }
+            }
+          ],
+          'info' => {
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 18,
+            'macro' => 'lm'
+          }
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 4,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'text' => '
+@ignore
+ignored ',
+                        'type' => 'bracketed_arg'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    }
+                  }
+                ],
+                'extra' => {
+                  'name' => 'lm'
+                },
+                'type' => 'linemacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'linemacro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'b 
+'
+            },
+            {
+              'args' => [
+                {
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'block_line_arg'
+                }
+              ],
+              'cmdname' => 'ignore',
+              'contents' => [
+                {
+                  'source_marks' => [
+                    {
+                      'counter' => 4,
+                      'position' => 10,
+                      'sourcemark_type' => 'linemacro_expansion',
+                      'status' => 'end'
+                    }
+                  ],
+                  'text' => 'ignored  a',
+                  'type' => 'raw'
+                },
+                {
+                  'text' => '
+',
+                  'type' => 'raw'
+                },
+                {
+                  'text' => 'still ignored
+',
+                  'type' => 'raw'
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'ignore'
+                        }
+                      ],
+                      'info' => {
+                        'spaces_after_argument' => {
+                          'text' => '
+'
+                        }
+                      },
+                      'type' => 'line_arg'
+                    }
+                  ],
+                  'cmdname' => 'end',
+                  'extra' => {
+                    'text_arg' => 'ignore'
+                  },
+                  'info' => {
+                    'spaces_before_argument' => {
+                      'text' => ' '
+                    }
+                  },
+                  'source_info' => {
+                    'file_name' => '',
+                    'line_nr' => 28,
+                    'macro' => ''
+                  }
+                }
+              ],
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 26,
+                'macro' => 'lm'
+              }
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 5,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'text' => '
+@macro mymac {e, f}
+args \\e\\|\\f\\|
+@defline @lm {\\e\\} {\\f\\}
+',
+                        'type' => 'bracketed_arg'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    }
+                  }
+                ],
+                'extra' => {
+                  'name' => 'lm'
+                },
+                'type' => 'linemacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'linemacro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'b 
+'
+            },
+            {
+              'args' => [
+                {
+                  'text' => 'mymac',
+                  'type' => 'macro_name'
+                },
+                {
+                  'text' => 'e',
+                  'type' => 'macro_arg'
+                },
+                {
+                  'text' => 'f',
+                  'type' => 'macro_arg'
+                }
+              ],
+              'cmdname' => 'macro',
+              'contents' => [
+                {
+                  'text' => 'args \\e\\|\\f\\|
+',
+                  'type' => 'raw'
+                },
+                {
+                  'text' => '@defline @lm {\\e\\} {\\f\\}
+',
+                  'type' => 'raw'
+                },
+                {
+                  'source_marks' => [
+                    {
+                      'counter' => 5,
+                      'position' => 2,
+                      'sourcemark_type' => 'linemacro_expansion',
+                      'status' => 'end'
+                    }
+                  ],
+                  'text' => ' a',
+                  'type' => 'raw'
+                },
+                {
+                  'text' => '
+',
+                  'type' => 'raw'
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'macro'
+                        }
+                      ],
+                      'info' => {
+                        'spaces_after_argument' => {
+                          'text' => '
+'
+                        }
+                      },
+                      'type' => 'line_arg'
+                    }
+                  ],
+                  'cmdname' => 'end',
+                  'extra' => {
+                    'text_arg' => 'macro'
+                  },
+                  'info' => {
+                    'spaces_before_argument' => {
+                      'text' => ' '
+                    }
+                  },
+                  'source_info' => {
+                    'file_name' => '',
+                    'line_nr' => 35,
+                    'macro' => ''
+                  }
+                }
+              ],
+              'info' => {
+                'arg_line' => ' mymac {e, f}
+'
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 34,
+                'macro' => 'lm'
+              }
+            }
+          ],
+          'type' => 'paragraph'
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'defblock',
+          'contents' => [
+            {
+              'contents' => [
+                {
+                  'source_marks' => [
+                    {
+                      'counter' => 1,
+                      'element' => {
+                        'args' => [
+                          {
+                            'contents' => [
+                              {
+                                'text' => 'arg1'
+                              }
+                            ],
+                            'type' => 'brace_command_arg'
+                          },
+                          {
+                            'contents' => [
+                              {
+                                'text' => 'arg2'
+                              }
+                            ],
+                            'info' => {
+                              'spaces_before_argument' => {
+                                'text' => ' '
+                              }
+                            },
+                            'type' => 'brace_command_arg'
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'mymac'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
+                  'text' => ''
+                },
+                {
+                  'contents' => [
+                    {
+                      'text' => 'args arg1|arg2|
+'
+                    }
+                  ],
+                  'type' => 'paragraph'
+                }
+              ],
+              'type' => 'def_item'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'extra' => {
+                        'def_role' => 'category'
+                      },
+                      'text' => 'b'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'spaces'
+                      },
+                      'text' => ' ',
+                      'type' => 'spaces'
+                    },
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'arg1'
+                        }
+                      ],
+                      'extra' => {
+                        'def_role' => 'name'
+                      },
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 38,
+                        'macro' => 'lm'
+                      },
+                      'type' => 'bracketed_arg'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'spaces'
+                      },
+                      'text' => ' ',
+                      'type' => 'spaces'
+                    },
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'arg2'
+                        }
+                      ],
+                      'extra' => {
+                        'def_role' => 'arg'
+                      },
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 38,
+                        'macro' => 'lm'
+                      },
+                      'type' => 'bracketed_arg'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'spaces'
+                      },
+                      'text' => ' ',
+                      'type' => 'spaces'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'arg'
+                      },
+                      'source_marks' => [
+                        {
+                          'counter' => 6,
+                          'position' => 1,
+                          'sourcemark_type' => 'linemacro_expansion',
+                          'status' => 'end'
+                        }
+                      ],
+                      'text' => 'a'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'defline',
+              'extra' => {
+                'def_command' => 'defline',
+                'def_index_element' => {},
+                'original_def_cmdname' => 'defline'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'source_marks' => [
+                    {
+                      'counter' => 6,
+                      'element' => {
+                        'args' => [
+                          {
+                            'contents' => [
+                              {
+                                'text' => '{arg1} {arg2}'
+                              }
+                            ],
+                            'info' => {
+                              'spaces_before_argument' => {
+                                'text' => ' '
+                              }
+                            }
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'lm'
+                        },
+                        'type' => 'linemacro_call'
+                      },
+                      'position' => 1,
+                      'sourcemark_type' => 'linemacro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 38,
+                'macro' => 'mymac'
+              },
+              'type' => 'def_line'
+            },
+            {
+              'contents' => [
+                {
+                  'text' => ' ',
+                  'type' => 'spaces_before_paragraph'
+                },
+                {
+                  'contents' => [
+                    {
+                      'source_marks' => [
+                        {
+                          'counter' => 1,
+                          'position' => 1,
+                          'sourcemark_type' => 'macro_expansion',
+                          'status' => 'end'
+                        }
+                      ],
+                      'text' => 'a
+'
+                    }
+                  ],
+                  'type' => 'paragraph'
+                }
+              ],
+              'type' => 'def_item'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'defblock'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'defblock'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 39,
+                'macro' => ''
+              }
+            }
+          ],
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 37,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'block_begin_end_in_linemacro_call'}{'contents'}[0]{'contents'}[17]{'contents'}[1]{'extra'}{'def_index_element'}
 = 
$result_trees{'block_begin_end_in_linemacro_call'}{'contents'}[0]{'contents'}[17]{'contents'}[1]{'args'}[0]{'contents'}[2];
+
+$result_texis{'block_begin_end_in_linemacro_call'} = '@linemacro lm {a}
+b \\a\\ a
+@end linemacro
+
+b 
+@quotation aa
+in quotation
+ a
+@end quotation
+
+@quotation hh
+b 
+@end quotation
+
+ a
+
+b 
+@quotation a
+in quotation
+
+aa.
+@end quotation
+
+b 
+@ignore
+ignored  a
+still ignored
+@end ignore
+
+b 
+@macro mymac {e, f}
+args \\e\\|\\f\\|
+@defline @lm {\\e\\} {\\f\\}
+ a
+@end macro
+
+@defblock
+args arg1|arg2|
+@defline b {arg1} {arg2} a
+ a
+@end defblock
+
+';
+
+
+$result_texts{'block_begin_end_in_linemacro_call'} = '
+b 
+aa
+in quotation
+ a
+
+hh
+b 
+
+a
+
+b 
+a
+in quotation
+
+aa.
+
+b 
+
+b 
+
+args arg1|arg2|
+b: arg1 arg2 a
+a
+
+';
+
+$result_errors{'block_begin_end_in_linemacro_call'} = [];
+
+
+$result_floats{'block_begin_end_in_linemacro_call'} = {};
+
+
+1;
diff --git a/tp/t/results/linemacro/end_conditional_in_linemacro.pl 
b/tp/t/results/linemacro/end_conditional_in_linemacro.pl
index f3c1ebce92..df75c14d47 100644
--- a/tp/t/results/linemacro/end_conditional_in_linemacro.pl
+++ b/tp/t/results/linemacro/end_conditional_in_linemacro.pl
@@ -199,6 +199,91 @@ $result_trees{'end_conditional_in_linemacro'} = {
             }
           ],
           'type' => 'paragraph'
+        },
+        {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'contents' => [
+                      {
+                        'text' => 'b'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_after_argument' => {
+                        'text' => '
+'
+                      }
+                    },
+                    'type' => 'block_line_arg'
+                  }
+                ],
+                'cmdname' => 'ifset',
+                'contents' => [
+                  {
+                    'text' => '@lm {text
+',
+                    'type' => 'raw'
+                  },
+                  {
+                    'args' => [
+                      {
+                        'contents' => [
+                          {
+                            'text' => 'ifset'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_after_argument' => {
+                            'text' => '
+'
+                          }
+                        },
+                        'type' => 'line_arg'
+                      }
+                    ],
+                    'cmdname' => 'end',
+                    'extra' => {
+                      'text_arg' => 'ifset'
+                    },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'source_info' => {
+                      'file_name' => '',
+                      'line_nr' => 11,
+                      'macro' => ''
+                    }
+                  }
+                ],
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
+                'source_info' => {
+                  'file_name' => '',
+                  'line_nr' => 9,
+                  'macro' => ''
+                }
+              },
+              'position' => 1,
+              'sourcemark_type' => 'ignored_conditional_block'
+            }
+          ],
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
         }
       ],
       'type' => 'before_node_section'
@@ -212,14 +297,28 @@ $result_texis{'end_conditional_in_linemacro'} = 
'@linemacro lm {a}
 @end linemacro
 
 text
-  ';
+  
+
+';
 
 
 $result_texts{'end_conditional_in_linemacro'} = '
 text
-  ';
+  
 
-$result_errors{'end_conditional_in_linemacro'} = [];
+';
+
+$result_errors{'end_conditional_in_linemacro'} = [
+  {
+    'error_line' => 'misplaced }
+',
+    'file_name' => '',
+    'line_nr' => 11,
+    'macro' => '',
+    'text' => 'misplaced }',
+    'type' => 'error'
+  }
+];
 
 
 $result_floats{'end_conditional_in_linemacro'} = {};



reply via email to

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