texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/t/01use.t: update tree. Do not use 'use vars


From: Patrice Dumas
Subject: branch master updated: * tp/t/01use.t: update tree. Do not use 'use vars'.
Date: Tue, 06 Dec 2022 16:36:47 -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 d830640b07 * tp/t/01use.t: update tree.  Do not use 'use vars'.
d830640b07 is described below

commit d830640b07c3d28848f40efeed099f1cd85dc549
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Dec 6 22:36:36 2022 +0100

    * tp/t/01use.t: update tree.  Do not use 'use vars'.
---
 ChangeLog    |  4 ++++
 tp/t/01use.t | 74 +++++++++++++++++++++++++++---------------------------------
 2 files changed, 37 insertions(+), 41 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 417217c7de..69320633dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-12-06  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/t/01use.t: update tree.  Do not use 'use vars'.
+
 2022-12-06  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_parse_def),
diff --git a/tp/t/01use.t b/tp/t/01use.t
index c63894cd95..783471ec93 100644
--- a/tp/t/01use.t
+++ b/tp/t/01use.t
@@ -11,14 +11,9 @@ plan tests => 2;
 
 ok(1, "modules loading"); # If we made it this far, we're ok.
 
-#########################
-
-# Insert your test code below, the Test::More module is use()ed here so read
-# its man page ( perldoc Test::More ) for help writing this test script.
-
-use vars qw($manual_tree $manual_tree_result);
-
-$manual_tree = { 'cmdname' => 'multitable',
+# Note that this tree is not necessarily updated when the tree elements
+# change, so it generally uses obsolete constructs.
+my $manual_tree = { 'cmdname' => 'multitable',
   'args' => [
         { 'type' => 'block_line_arg',
           'contents' => [
@@ -47,10 +42,9 @@ $manual_tree = { 'cmdname' => 'multitable',
              {'text' => " ccc\n"},
           ],
        } ],
-  'extra' => { 'number_of_columns' => 3,
-               'end_command' => {} },
+  'extra' => { 'max_columns' => 3, },
   'contents' => [
-           { 'type' => 'multitable_title',
+           { 'type' => 'before_item',
              'contents' => [
                              { 'type' => 'paragraph',
                                'contents' => [
@@ -73,57 +67,55 @@ $manual_tree = { 'cmdname' => 'multitable',
                              }
                            ]
            },
-           { 'cmdname' => 'item',
-             'type' => 'multitable_row',
-             'extra' => {'row_number' => 1},
+           {
+             'type' => 'multitable_body',
              'contents' => [
-                             {  
-                                'type' => 'multitable_cell',
-                                'extra' => {'col_number' => 1,
-                                            'row_number' => 1},
-                                'contents' => [ {'text' => " \n" } ]
-                              }
+                             {
+                               'type' => 'row',
+                               'extra' => {'row_number' => 1},
+                               'contents' => [
+                                               {
+                                                 'cmdname' => 'item',
+                                                 'extra' => {'cell_number' => 
1,},
+                                                 'contents' => [ {'text' => " 
\n" } ]
+                                               }
+                                             ]
+                             },
                            ]
            },
-           { 'cmdname' => 'end',
-             'extra' => {'command_argument' => 'multitable',
+           {
+             'cmdname' => 'end',
+             'info' => {
+                         'spaces_before_argument' => ' '
+                       },
+             'extra' => {
                          'text_arg' => 'multitable',
-                         },
-            'args' => [
+                        },
+             'args' => [
                 {
+                  'type' => 'line_arg',
                   'contents' => [
                     {
-                      'parent' => {},
-                      'text' => ' ',
-                      'type' => 'empty_spaces_after_command'
-                    },
-                    {
-                      'parent' => {},
                       'text' => 'multitable'
                     },
-                    {
-                      'parent' => {},
-                      'text' => '
-',
-                      'type' => 'spaces_at_end'
-                    }
                   ],
-                  'parent' => {},
-                  'type' => 'misc_line_arg'
+                  'info' => {
+                              'spaces_after_argument' => '
+',
+                            },
                 }
               ],
 
            }
   ]
-  
 };
 
-$manual_tree_result = '@multitable {aaaa} {xx@b{rr}} ccc
+my $manual_tree_result = '@multitable {aaaa} {xx@b{rr}} ccc
 title@verb{: in verb } :}@@.
 @item 
 @end multitable
 ';
 
-is (Texinfo::Convert::Texinfo::convert_to_texinfo($manual_tree), 
+is (Texinfo::Convert::Texinfo::convert_to_texinfo($manual_tree),
      $manual_tree_result, "tree_to_texi on a manually written tree");
 



reply via email to

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