[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/t/65linemacro.t (recursive_linemacro_in_call
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/t/65linemacro.t (recursive_linemacro_in_call): new test. |
Date: |
Thu, 20 Jul 2023 06:08:56 -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 b066d5846c * tp/t/65linemacro.t (recursive_linemacro_in_call): new
test.
b066d5846c is described below
commit b066d5846c2d187167015cf245e3b817323026f8
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jul 20 12:08:47 2023 +0200
* tp/t/65linemacro.t (recursive_linemacro_in_call): new test.
---
ChangeLog | 4 +
tp/Makefile.tres | 1 +
tp/t/65linemacro.t | 12 +-
.../linemacro/recursive_linemacro_in_call.pl | 162 +++++++++++++++++++++
4 files changed, 174 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2be9ab2a64..2d2fcdee88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2023-07-20 Patrice Dumas <pertusus@free.fr>
+
+ * tp/t/65linemacro.t (recursive_linemacro_in_call): new test.
+
2023-07-20 Patrice Dumas <pertusus@free.fr>
* tp/t/60macro.t (arobase_brace_in_macro_call), tp/t/65linemacro.t
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index 23fc879409..c7ffbb2a9e 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -1230,6 +1230,7 @@ test_files_generated_list =
$(test_tap_files_generated_list) \
t/results/linemacro/paragraph_no_paragraph.pl \
t/results/linemacro/protected_spaces_on_line.pl \
t/results/linemacro/recursive_linemacro_in_body.pl \
+ t/results/linemacro/recursive_linemacro_in_call.pl \
t/results/linemacro/simple_nested_linemacro_calls.pl \
t/results/linemacro/spaces_after_command_in_call.pl \
t/results/linemacro/spaces_after_macro_linemacro_commands_in_call.pl \
diff --git a/tp/t/65linemacro.t b/tp/t/65linemacro.t
index 3d64ca27f8..ecb6e1fb0f 100644
--- a/tp/t/65linemacro.t
+++ b/tp/t/65linemacro.t
@@ -361,6 +361,13 @@ now second arg: \b\
@anorecurse {aa} b c
', {'MAX_MACRO_CALL_NESTING' => 100}],
+['recursive_linemacro_in_call',
+'@linemacro anorecurse {arg, other}
+\arg\ d \other\
+@end linemacro
+
+@anorecurse {@anorecurse a b} c
+'],
['comment_in_linemacro_call',
'@linemacro lm {a, b}
c \a\ d
@@ -394,11 +401,6 @@ c \a\ d
after
']
-
-# TODO
-# add more recursive linemacro call
-# test cases of line commands, including linemacros on the same
-# line to check commands closing in that context.
);
diff --git a/tp/t/results/linemacro/recursive_linemacro_in_call.pl
b/tp/t/results/linemacro/recursive_linemacro_in_call.pl
new file mode 100644
index 0000000000..d50bc3badc
--- /dev/null
+++ b/tp/t/results/linemacro/recursive_linemacro_in_call.pl
@@ -0,0 +1,162 @@
+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{'recursive_linemacro_in_call'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'text' => 'anorecurse',
+ 'type' => 'macro_name'
+ },
+ {
+ 'text' => 'arg',
+ 'type' => 'macro_arg'
+ },
+ {
+ 'text' => 'other',
+ 'type' => 'macro_arg'
+ }
+ ],
+ 'cmdname' => 'linemacro',
+ 'contents' => [
+ {
+ 'text' => '\\arg\\ d \\other\\
+',
+ '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' => ' anorecurse {arg, other}
+'
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'source_marks' => [
+ {
+ 'counter' => 1,
+ 'element' => {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => '@anorecurse a b',
+ 'type' => 'bracketed_arg'
+ }
+ ],
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ }
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'c'
+ }
+ ],
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ }
+ }
+ ],
+ 'extra' => {
+ 'name' => 'anorecurse'
+ },
+ 'type' => 'linemacro_call'
+ },
+ 'sourcemark_type' => 'linemacro_expansion',
+ 'status' => 'start'
+ }
+ ],
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'type' => 'before_node_section'
+ }
+ ],
+ 'type' => 'document_root'
+};
+
+$result_texis{'recursive_linemacro_in_call'} = '@linemacro anorecurse {arg,
other}
+\\arg\\ d \\other\\
+@end linemacro
+
+
+';
+
+
+$result_texts{'recursive_linemacro_in_call'} = '
+
+';
+
+$result_errors{'recursive_linemacro_in_call'} = [
+ {
+ 'error_line' => 'recursive call of macro anorecurse is not allowed; use
@rmacro if needed (possibly involving @anorecurse)
+',
+ 'file_name' => '',
+ 'line_nr' => 5,
+ 'macro' => 'anorecurse',
+ 'text' => 'recursive call of macro anorecurse is not allowed; use @rmacro
if needed',
+ 'type' => 'error'
+ }
+];
+
+
+$result_floats{'recursive_linemacro_in_call'} = {};
+
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/t/65linemacro.t (recursive_linemacro_in_call): new test.,
Patrice Dumas <=