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/58alias.t: add alias_mac


From: Patrice Dumas
Subject: branch master updated: * tp/Makefile.tres, tp/t/58alias.t: add alias_macro_target_removed to test an alias resolving to a @macro after @unmacro.
Date: Wed, 01 Mar 2023 10:54:40 -0500

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 254c2858e5 * tp/Makefile.tres, tp/t/58alias.t: add 
alias_macro_target_removed to test an alias resolving to a @macro after 
@unmacro.
254c2858e5 is described below

commit 254c2858e5a38879bb37162e955b65dfc46af141
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Mar 1 16:54:29 2023 +0100

    * tp/Makefile.tres, tp/t/58alias.t: add alias_macro_target_removed
    to test an alias resolving to a @macro after @unmacro.
---
 ChangeLog                        |  5 +++++
 tp/Makefile.tres                 |  1 +
 tp/Texinfo/XS/parsetexi/parser.c |  3 ++-
 tp/t/58alias.t                   | 13 +++++++++++++
 4 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c77ccf2e16..9e1d8dee9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-03-01  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Makefile.tres, tp/t/58alias.t: add alias_macro_target_removed
+       to test an alias resolving to a @macro after @unmacro.
+
 2023-03-01  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index 245b3a6116..2493e80ad4 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -62,6 +62,7 @@ test_tap_files_generated_list = \
   t/xml_tests.t
 
 test_files_generated_list = $(test_tap_files_generated_list) \
+  t/results/alias/alias_macro_target_removed.pl \
   t/results/alias/alias_non_existing_command.pl \
   t/results/alias/alias_of_added_index.pl \
   t/results/alias/alias_of_added_index_before_added_index.pl \
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index d10a27175e..850c4105c4 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -1815,7 +1815,8 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
   /* Handle unknown command. */
   if ((!cmd && command)
       /* command marked as unknown, normally a registered user-defined command
-         that was set as @alias-ed but has not been defined since */
+         that was set as @alias-ed but has not been defined since, or
+         that has been removed (with @unmacro) */
       || (command_data(cmd).flags & CF_UNKNOWN)
           /* Alias command that did not resolve to a non alias command.
              This is possible only if the command read was already an alias
diff --git a/tp/t/58alias.t b/tp/t/58alias.t
index 4771d10a88..0a2a0c59c8 100644
--- a/tp/t/58alias.t
+++ b/tp/t/58alias.t
@@ -158,6 +158,19 @@ in lang
 @strong{bb}.
 ',{'test_formats' => ['plaintext']}
 ,],
+['alias_macro_target_removed',
+'@macro mystrong {arg}
+!!\arg\!!
+@end macro
+
+@alias new = mystrong
+
+@new{aa}
+
+@unmacro mystrong
+
+@new{bb}
+'],
 );
 
 run_all('alias', \@test_cases);



reply via email to

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