[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6535] add test to 60macro.t
From: |
Gavin D. Smith |
Subject: |
[6535] add test to 60macro.t |
Date: |
Sun, 16 Aug 2015 18:03:55 +0000 |
Revision: 6535
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6535
Author: gavin
Date: 2015-08-16 18:03:54 +0000 (Sun, 16 Aug 2015)
Log Message:
-----------
add test to 60macro.t
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/t/60macro.t
Added Paths:
-----------
trunk/tp/t/results/macro/macro_expands_to_empty.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-08-16 17:47:09 UTC (rev 6534)
+++ trunk/ChangeLog 2015-08-16 18:03:54 UTC (rev 6535)
@@ -1,5 +1,9 @@
2015-08-15 Gavin Smith <address@hidden>
+ * tp/t/60macro.t: New test 'macro_expands_to_empty'.
+
+2015-08-15 Gavin Smith <address@hidden>
+
* tp/texi2any.pl (%formats_table): Use the right key name to
store module names for 'debugtree' and 'debugcount'.
Modified: trunk/tp/t/60macro.t
===================================================================
--- trunk/tp/t/60macro.t 2015-08-16 17:47:09 UTC (rev 6534)
+++ trunk/tp/t/60macro.t 2015-08-16 18:03:54 UTC (rev 6535)
@@ -46,6 +46,14 @@
This 2 address@hidden A.
'],
+['macro_expands_to_empty',
+'@macro foo {arg}
+\arg\
address@hidden macro
+
address@hidden
address@hidden
+'],
['empty_end','@macro foo {aaa, }
in foo
@end macro'],
Added: trunk/tp/t/results/macro/macro_expands_to_empty.pl
===================================================================
--- trunk/tp/t/results/macro/macro_expands_to_empty.pl
(rev 0)
+++ trunk/tp/t/results/macro/macro_expands_to_empty.pl 2015-08-16 18:03:54 UTC
(rev 6535)
@@ -0,0 +1,119 @@
+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);
+
+use utf8;
+
+$result_trees{'macro_expands_to_empty'} = {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'parent' => {},
+ 'text' => 'foo',
+ 'type' => 'macro_name'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'arg',
+ 'type' => 'macro_arg'
+ }
+ ],
+ 'cmdname' => 'macro',
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '\\arg\\',
+ 'type' => 'raw'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'last_raw_newline'
+ }
+ ],
+ 'extra' => {
+ 'arg_line' => ' foo {arg}
+',
+ 'args_index' => {
+ 'arg' => 0
+ },
+ 'macrobody' => '\\arg\\
+',
+ 'spaces_after_command' => {
+ 'extra' => {
+ 'command' => {}
+ },
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line_after_command'
+ }
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {},
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'aa
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'macro_expands_to_empty'}{'contents'}[0]{'args'}[0]{'parent'} =
$result_trees{'macro_expands_to_empty'}{'contents'}[0];
+$result_trees{'macro_expands_to_empty'}{'contents'}[0]{'args'}[1]{'parent'} =
$result_trees{'macro_expands_to_empty'}{'contents'}[0];
+$result_trees{'macro_expands_to_empty'}{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'macro_expands_to_empty'}{'contents'}[0];
+$result_trees{'macro_expands_to_empty'}{'contents'}[0]{'contents'}[1]{'parent'}
= $result_trees{'macro_expands_to_empty'}{'contents'}[0];
+$result_trees{'macro_expands_to_empty'}{'contents'}[0]{'extra'}{'spaces_after_command'}{'extra'}{'command'}
= $result_trees{'macro_expands_to_empty'}{'contents'}[0];
+$result_trees{'macro_expands_to_empty'}{'contents'}[0]{'extra'}{'spaces_after_command'}{'parent'}
= $result_trees{'macro_expands_to_empty'};
+$result_trees{'macro_expands_to_empty'}{'contents'}[0]{'parent'} =
$result_trees{'macro_expands_to_empty'};
+$result_trees{'macro_expands_to_empty'}{'contents'}[1] =
$result_trees{'macro_expands_to_empty'}{'contents'}[0]{'extra'}{'spaces_after_command'};
+$result_trees{'macro_expands_to_empty'}{'contents'}[2]{'parent'} =
$result_trees{'macro_expands_to_empty'};
+$result_trees{'macro_expands_to_empty'}{'contents'}[3]{'parent'} =
$result_trees{'macro_expands_to_empty'};
+$result_trees{'macro_expands_to_empty'}{'contents'}[4]{'contents'}[0]{'parent'}
= $result_trees{'macro_expands_to_empty'}{'contents'}[4];
+$result_trees{'macro_expands_to_empty'}{'contents'}[4]{'parent'} =
$result_trees{'macro_expands_to_empty'};
+
+$result_texis{'macro_expands_to_empty'} = '@macro foo {arg}
+\\arg\\
address@hidden macro
+
+
+aa
+';
+
+
+$result_texts{'macro_expands_to_empty'} = '
+
+aa
+';
+
+$result_errors{'macro_expands_to_empty'} = [];
+
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6535] add test to 60macro.t,
Gavin D. Smith <=