texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sat, 6 Jan 2024 12:21:45 -0500 (EST)

branch: master
commit 0559c251dd8985f3c871eb654e7f16c6f54fa9f0
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Jan 6 18:21:42 2024 +0100

    * tp/t/18itemize.t (enumerate_argument, enumerate_argument_item):
    add test of @enumerate 0.
---
 ChangeLog                                       |   5 +
 tp/TODO                                         |   3 -
 tp/t/18itemize.t                                |   8 ++
 tp/t/results/itemize/enumerate_argument.pl      |  75 +++++++++++++
 tp/t/results/itemize/enumerate_argument_item.pl | 136 ++++++++++++++++++++++++
 5 files changed, 224 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ff2128791b..0226201833 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-06  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/t/18itemize.t (enumerate_argument, enumerate_argument_item):
+       add test of @enumerate 0.
+
 2024-01-06  Patrice Dumas  <pertusus@free.fr>
 
        * po/Makevars (XGETTEXT_OPTIONS): fix index of
diff --git a/tp/TODO b/tp/TODO
index f2c2baf67b..f9799da2c9 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -10,9 +10,6 @@ This is the todo list for texi2any
 Before next release
 ===================
 
-add test of 
-@enumerate 0
-
 add test of init css_add_info 
   $converter->css_set_selector_style('h1.titlefont', 'text-align:center');
 and css_set_selector_style for a selector already set
diff --git a/tp/t/18itemize.t b/tp/t/18itemize.t
index 7c4e043e7b..5503856a79 100644
--- a/tp/t/18itemize.t
+++ b/tp/t/18itemize.t
@@ -56,6 +56,9 @@ my @test_cases = (
 
 @enumerate z @c comment
 @end enumerate
+
+@enumerate 0
+@end enumerate
 '],
 ['enumerate_argument_item',
 '@enumerate 1
@@ -72,6 +75,11 @@ my @test_cases = (
 @item lower case first
 @item lower case second
 @end enumerate
+
+@enumerate 0
+@item numeric zero first
+@item numeric zero second
+@end enumerate
 '],
 ['comment_first_on_enumerate_line',
 '@enumerate @c comment on enumerate line
diff --git a/tp/t/results/itemize/enumerate_argument.pl 
b/tp/t/results/itemize/enumerate_argument.pl
index 16beea5e28..4c5cda38c2 100644
--- a/tp/t/results/itemize/enumerate_argument.pl
+++ b/tp/t/results/itemize/enumerate_argument.pl
@@ -219,6 +219,73 @@ $result_trees{'enumerate_argument'} = {
           'source_info' => {
             'line_nr' => 7
           }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => '0'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'enumerate',
+          'contents' => [
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'enumerate'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'enumerate'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'line_nr' => 11
+              }
+            }
+          ],
+          'extra' => {
+            'enumerate_specification' => '0'
+          },
+          'info' => {
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'line_nr' => 10
+          }
         }
       ],
       'type' => 'before_node_section'
@@ -235,11 +302,15 @@ $result_texis{'enumerate_argument'} = '@enumerate 1
 
 @enumerate z @c comment
 @end enumerate
+
+@enumerate 0
+@end enumerate
 ';
 
 
 $result_texts{'enumerate_argument'} = '
 
+
 ';
 
 $result_errors{'enumerate_argument'} = [];
@@ -254,6 +325,7 @@ $result_converted{'plaintext'}->{'enumerate_argument'} = '';
 
 $result_converted{'html_text'}->{'enumerate_argument'} = '
 
+
 ';
 
 
@@ -265,6 +337,9 @@ $result_converted{'xml'}->{'enumerate_argument'} = 
'<enumerate first="1" spaces=
 
 <enumerate first="z" spaces=" " endspaces=" "><enumeratefirst>z 
</enumeratefirst><!-- c comment -->
 </enumerate>
+
+<enumerate spaces=" " endspaces=" "><enumeratefirst>0</enumeratefirst>
+</enumerate>
 ';
 
 1;
diff --git a/tp/t/results/itemize/enumerate_argument_item.pl 
b/tp/t/results/itemize/enumerate_argument_item.pl
index 407b6054a0..816b9d1ace 100644
--- a/tp/t/results/itemize/enumerate_argument_item.pl
+++ b/tp/t/results/itemize/enumerate_argument_item.pl
@@ -363,6 +363,121 @@ $result_trees{'enumerate_argument_item'} = {
           'source_info' => {
             'line_nr' => 11
           }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => '0'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'enumerate',
+          'contents' => [
+            {
+              'cmdname' => 'item',
+              'contents' => [
+                {
+                  'text' => ' ',
+                  'type' => 'ignorable_spaces_after_command'
+                },
+                {
+                  'contents' => [
+                    {
+                      'text' => 'numeric zero first
+'
+                    }
+                  ],
+                  'type' => 'paragraph'
+                }
+              ],
+              'extra' => {
+                'item_number' => 1
+              },
+              'source_info' => {
+                'line_nr' => 17
+              }
+            },
+            {
+              'cmdname' => 'item',
+              'contents' => [
+                {
+                  'text' => ' ',
+                  'type' => 'ignorable_spaces_after_command'
+                },
+                {
+                  'contents' => [
+                    {
+                      'text' => 'numeric zero second
+'
+                    }
+                  ],
+                  'type' => 'paragraph'
+                }
+              ],
+              'extra' => {
+                'item_number' => 2
+              },
+              'source_info' => {
+                'line_nr' => 18
+              }
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'enumerate'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'enumerate'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'line_nr' => 19
+              }
+            }
+          ],
+          'extra' => {
+            'enumerate_specification' => '0'
+          },
+          'info' => {
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'line_nr' => 16
+          }
         }
       ],
       'type' => 'before_node_section'
@@ -385,6 +500,11 @@ $result_texis{'enumerate_argument_item'} = '@enumerate 1
 @item lower case first
 @item lower case second
 @end enumerate
+
+@enumerate 0
+@item numeric zero first
+@item numeric zero second
+@end enumerate
 ';
 
 
@@ -396,6 +516,9 @@ B. upper case second
 
 z. lower case first
 aa. lower case second
+
+0. numeric zero first
+1. numeric zero second
 ';
 
 $result_errors{'enumerate_argument_item'} = [];
@@ -413,6 +536,9 @@ $result_converted{'plaintext'}->{'enumerate_argument_item'} 
= '  1. numeric firs
 
   z. lower case first
   aa. lower case second
+
+  0. numeric zero first
+  1. numeric zero second
 ';
 
 
@@ -430,6 +556,11 @@ 
$result_converted{'html_text'}->{'enumerate_argument_item'} = '<ol class="enumer
 <li> lower case first
 </li><li> lower case second
 </li></ol>
+
+<ol class="enumerate" start="0">
+<li> numeric zero first
+</li><li> numeric zero second
+</li></ol>
 ';
 
 
@@ -447,6 +578,11 @@ $result_converted{'xml'}->{'enumerate_argument_item'} = 
'<enumerate first="1" sp
 <listitem> <para>lower case first
 </para></listitem><listitem> <para>lower case second
 </para></listitem></enumerate>
+
+<enumerate spaces=" " endspaces=" "><enumeratefirst>0</enumeratefirst>
+<listitem> <para>numeric zero first
+</para></listitem><listitem> <para>numeric zero second
+</para></listitem></enumerate>
 ';
 
 1;



reply via email to

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