texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp Texinfo/Convert/Converter.pm Texinfo...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Convert/Converter.pm Texinfo...
Date: Sat, 01 Oct 2011 15:14:23 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/10/01 15:14:23

Modified files:
        tp/Texinfo/Convert: Converter.pm DocBook.pm HTML.pm Info.pm 
                            Plaintext.pm 
        tp/t           : converters_tests.t info_tests.t 
Added files:
        tp/t/results/info_tests: paragraphindent_asis_first.pl 
                                 paragraphindent_none_first.pl 

Log message:
        More defaults in all_converters_defaults.
        Really keep the default values in the converter, to reset all possible 
        defaults in _unset_global_multiple_commands.
        Really process informative_commands in DocBook.
        Better version of _informative_commands in Texinfo/Convert/Converter.pm
        to use that version more generally.
        In Texinfo/Convert/Plaintext.pm use directly the values set for
        informative commands, such that _unset_global_multiple_commands
        better undo what _informative_commands did.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Converter.pm?cvsroot=texinfo&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/DocBook.pm?cvsroot=texinfo&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.161&r2=1.162
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Info.pm?cvsroot=texinfo&r1=1.65&r2=1.66
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.167&r2=1.168
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/converters_tests.t?cvsroot=texinfo&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/info_tests.t?cvsroot=texinfo&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/paragraphindent_asis_first.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/paragraphindent_none_first.pl?cvsroot=texinfo&rev=1.1

Patches:
Index: Texinfo/Convert/Converter.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Converter.pm,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- Texinfo/Convert/Converter.pm        30 Sep 2011 22:31:31 -0000      1.49
+++ Texinfo/Convert/Converter.pm        1 Oct 2011 15:14:21 -0000       1.50
@@ -32,9 +32,6 @@
 $VERSION = '0.01';
 
 my %defaults = (
-  'frenchspacing'        => 'off',
-  'paragraphindent'      => 3,
-  'firstparagraphindent' => 'none',
   'ENABLE_ENCODING'      => 1,
   'footnotestyle'        => 'end',
 #  'perl_encoding'        => 'ascii',
@@ -42,9 +39,7 @@
   'OUTFILE'              => undef,
   'SUBDIR'               => undef,
   'documentlanguage'     => undef,
-  'NUMBER_FOOTNOTES'     => 1,
-  'include_directories'  => undef,
-  'NUMBER_SECTIONS'      => 1,
+
 );
 
 # defaults for all converters.  Maybe more could be added, especially what
@@ -57,8 +52,12 @@
   'fillcolumn'           => 72,
   'expanded_formats'     => undef,
   'include_directories'  => undef,
-
-  
+  'NUMBER_SECTIONS'      => 1,
+  'NUMBER_FOOTNOTES'     => 1,
+  'frenchspacing'        => 'off',
+  'paragraphindent'      => 3,
+  'firstparagraphindent' => 'none',
+  'allowcodebreaks'      => 'true',
 
   'DEBUG'                => 0,
   'TEST'                 => 0,
@@ -89,18 +88,36 @@
   my $root = shift;
 
   my $cmdname = $root->{'cmdname'};
+  $cmdname = 'shortcontents' if ($cmdname eq 'summarycontents');
+
   return if ($self->{'set'}->{$cmdname});
 
-  if (exists($root->{'extra'}->{'text_arg'})) {
+  if ($Texinfo::Common::misc_commands{$cmdname} eq 'skipline') {
+    $self->set_conf($cmdname, 1);
+  } elsif (exists($root->{'extra'}->{'text_arg'})) {
     $self->set_conf($cmdname, $root->{'extra'}->{'text_arg'});
     if ($cmdname eq 'documentencoding'
         and defined($root->{'extra'})
         and defined($root->{'extra'}->{'perl_encoding'})
        ){
-        #and !$self->{'perl_encoding'}) {
+      # the following does not work with shifijs.  The encoding
+      # has to be set only once by open_out. 
+      #if (defined($self->{'fh'})) {
+      #  my $encoding = $self->{'perl_encoding'};
+      #  my $filehandle = $self->{'fh'};
+      #  if ($encoding eq 'utf8' or $encoding eq 'utf-8-strict') {
+      #    binmode($filehandle, ':utf8');
+      #  } else { # FIXME also right for shiftijs or similar encodings?
+      #    binmode($filehandle, ':bytes');
+      #  }
+      #  binmode($filehandle, ":encoding($encoding)");
+      #}
       $self->{'encoding_name'} = $root->{'extra'}->{'encoding_name'};
       $self->{'perl_encoding'} = $root->{'extra'}->{'perl_encoding'};
     }
+  } elsif ($root->{'extra'} and $root->{'extra'}->{'misc_args'}
+           and exists($root->{'extra'}->{'misc_args'}->[0])) {
+    $self->set_conf($cmdname, $root->{'extra'}->{'misc_args'}->[0]);
   }
 }
 
@@ -136,6 +153,7 @@
       $converter->{$key} = $defaults{$key};
     }
   }
+  $converter->{'conf_default'} = \%defaults;
   if (defined($conf)) {
     if ($conf->{'parser'}) {
       $converter->{'parser'} = $conf->{'parser'};
@@ -241,16 +259,20 @@
   foreach my $global_command ($self->_global_commands()) {
     if (defined($self->{'extra'}->{$global_command})
         and ref($self->{'extra'}->{$global_command}) eq 'ARRAY') {
-      next if (!exists($defaults{$global_command}));
-      if (Texinfo::Common::valid_option($global_command)) {
+      if (exists($self->{'conf_default'}->{$global_command})) {
         if ($self->get_conf('DEBUG')) {
           my $default = 'UNDEF';
-          $default = $defaults{$global_command} if 
(defined($defaults{$global_command}));
-          print STDERR "UNSET_global_multiple_commands $global_command: 
$default\n";
+          $default = $self->{'conf_default'}->{$global_command} 
+            if (defined($self->{'conf_default'}->{$global_command}));
+          my $set = 0;
+          $set = 1 if ($self->{'set'}->{$global_command});
+          print STDERR "UNSET_global_multiple_commands $global_command ($set): 
$default\n";
         }
-        $self->set_conf($global_command, $defaults{$global_command});
+        if (Texinfo::Common::valid_option($global_command)) {
+          $self->set_conf($global_command, 
$self->{'conf_default'}->{$global_command});
       } else {
-        $self->{$global_command} = $defaults{$global_command};
+          $self->{$global_command} = 
$self->{'conf_default'}->{$global_command};
+        }
       }
     }
   }

Index: Texinfo/Convert/DocBook.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/DocBook.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- Texinfo/Convert/DocBook.pm  1 Oct 2011 10:29:25 -0000       1.19
+++ Texinfo/Convert/DocBook.pm  1 Oct 2011 15:14:22 -0000       1.20
@@ -184,6 +184,16 @@
   delete $docbook_misc_commands{$command};
 }
 
+my %docbook_global_commands = (
+  'documentlanguage' => 1,
+  'documentencoding' => 1,
+);
+
+sub _global_commands($)
+{
+  return keys(%docbook_global_commands);
+}
+
 my %default_args_code_style 
   = %Texinfo::Convert::Converter::default_args_code_style;
 
@@ -553,6 +563,10 @@
       }
       return $self->_index_entry($root).${end_line};
     } elsif (exists($docbook_misc_commands{$root->{'cmdname'}})) {
+      if ($docbook_global_commands{$root->{'cmdname'}}) {
+        $self->_informative_command($root);
+        return '';
+      }
       my $command;
       if (exists ($docbook_misc_elements_with_arg_map{$root->{'cmdname'}})) {
         $command = $docbook_misc_elements_with_arg_map{$root->{'cmdname'}};

Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -b -r1.161 -r1.162
--- Texinfo/Convert/HTML.pm     1 Oct 2011 10:29:26 -0000       1.161
+++ Texinfo/Convert/HTML.pm     1 Oct 2011 15:14:22 -0000       1.162
@@ -842,8 +842,6 @@
   #'perl_encoding'        => undef,
   'OUTFILE'              => undef,
   'SUBDIR'               => undef,
-  'NUMBER_FOOTNOTES'     => 1,
-  'NUMBER_SECTIONS'      => 1,
   'USE_NODES'            => 1,
   'INLINE_CONTENTS'      => 1,
   'SPLIT'                => 'node',
@@ -856,7 +854,6 @@
   'OPEN_QUOTE_SYMBOL'    => '&lsquo;',
   'CLOSE_QUOTE_SYMBOL'   => '&rsquo;',
   'USE_ISO'              => 1,
-  'allowcodebreaks'      => 'true',
 # file name used for Top node when NODE_FILENAMES is true
   'TOP_NODE_FILE'        => 'index',
   'NODE_FILE_EXTENSION'  => 'html',
@@ -934,8 +931,6 @@
   'PASSIVE_ICONS'        => \%PASSIVE_ICONS,
   'SPECIAL_ELEMENTS_NAME' => \%SPECIAL_ELEMENTS_NAME,
   
-  'DEBUG'                => 0,
-  'TEST'                 => 0,
   'output_format'        => 'html',
 );
 
@@ -3163,33 +3158,6 @@
   return '';
 }
 
-sub _informative_command($$)
-{
-  my $self = shift;
-  my $root = shift;
-
-  my $cmdname = $root->{'cmdname'};
-  $cmdname = 'shortcontents' if ($cmdname eq 'summarycontents');
-
-  return if ($self->{'set'}->{$cmdname});
-  if ($misc_commands{$cmdname} eq 'skipline') {
-    $self->set_conf($cmdname, 1);
-  } elsif (exists($root->{'extra'}->{'text_arg'})) {
-    $self->set_conf($cmdname, $root->{'extra'}->{'text_arg'});
-    if ($cmdname eq 'documentencoding'
-        and defined($root->{'extra'})
-        and defined($root->{'extra'}->{'perl_encoding'})
-       ){
-        #and !$self->{'perl_encoding'}) {
-      $self->{'encoding_name'} = $root->{'extra'}->{'encoding_name'};
-      $self->{'perl_encoding'} = $root->{'extra'}->{'perl_encoding'};
-    }
-  } elsif ($root->{'extra'} and $root->{'extra'}->{'misc_args'}
-           and exists($root->{'extra'}->{'misc_args'}->[0])) {
-    $self->set_conf($cmdname, $root->{'extra'}->{'misc_args'}->[0]);
-  }
-}
-
 foreach my $informative_command (@informative_global_commands) {
   $default_commands_conversion{$informative_command} 
     = \&_convert_informative_command;

Index: Texinfo/Convert/Info.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Info.pm,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- Texinfo/Convert/Info.pm     29 Sep 2011 23:24:43 -0000      1.65
+++ Texinfo/Convert/Info.pm     1 Oct 2011 15:14:22 -0000       1.66
@@ -224,6 +224,7 @@
 
   # FIXME version/program
   #my $text = "This is $self->{'output_filename'}, produced by makeinfo 
version 4.13 from $self->{'input_basename'}.";
+  $self->_set_global_multiple_commands();
   my $paragraph = Texinfo::Convert::Paragraph->new();
   #my $result = $paragraph->add_text($text);
   my $result = $paragraph->add_text("This is ");
@@ -238,7 +239,6 @@
   $self->{'empty_lines_count'} = 1;
 
   if ($self->{'extra'} and $self->{'extra'}->{'copying'}) {
-    $self->_set_global_multiple_commands();
     print STDERR "COPYING HEADER\n" if ($self->get_conf('DEBUG'));
     $self->{'in_copying_header'} = 1;
     my $copying = $self->_convert({'contents' => 
@@ -246,7 +246,6 @@
     $result .= $copying;
     $result .= $self->_footnotes();
     delete $self->{'in_copying_header'};
-    $self->_unset_global_multiple_commands();
   }
   if ($self->{'info'}->{'dircategory_direntry'}) {
     $self->{'ignored_commands'}->{'direntry'} = 0;
@@ -269,6 +268,7 @@
     }
     $self->{'ignored_commands'}->{'direntry'} = 1;
   }
+  $self->_unset_global_multiple_commands();
   return $result;
 }
 

Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -b -r1.167 -r1.168
--- Texinfo/Convert/Plaintext.pm        30 Sep 2011 22:31:31 -0000      1.167
+++ Texinfo/Convert/Plaintext.pm        1 Oct 2011 15:14:22 -0000       1.168
@@ -272,9 +272,6 @@
 }
 
 my %defaults = (
-  'frenchspacing'        => 'off',
-  'paragraphindent'      => 3,
-  'firstparagraphindent' => 'none',
   'ENABLE_ENCODING'      => 1,
 # this default is for Info, but also when doing Texinfo fragments.  So this 
 # has to be explicitly set to 0 when doing real plaintext.
@@ -284,19 +281,13 @@
   'USE_SETFILENAME_EXTENSION' => 1,
 
   'footnotestyle'        => 'end',
-  'fillcolumn'           => 72,
   'encoding_name'        => undef,
   'perl_encoding'        => undef,
   'OUTFILE'              => undef,
   'SUBDIR'               => undef,
   'documentlanguage'     => undef,
-  'NUMBER_FOOTNOTES'     => 1,
   'empty_lines_count'    => undef,
-  'SPLIT_SIZE'           => 300000,
-  'NUMBER_SECTIONS'      => 1,
 
-  'DEBUG'                => 0,
-  'TEST'                 => 0,
   'output_format'        => '',
 );
 
@@ -324,54 +315,6 @@
  'summarycontents' => 1,
 );
 
-sub _informative_command($$)
-{
-  my $self = shift;
-  my $root = shift;
-
-  my $cmdname = $root->{'cmdname'};
-  $cmdname = 'shortcontents' if ($cmdname eq 'summarycontents');
-
-  return if ($self->{'set'}->{$cmdname});
-
-  if ($misc_commands{$cmdname} eq 'skipline') {
-    $self->set_conf($cmdname, 1);
-  } elsif (exists($root->{'extra'}->{'text_arg'})) {
-    $self->set_conf($cmdname, $root->{'extra'}->{'text_arg'});
-    if ($cmdname eq 'documentencoding'
-        and defined($root->{'extra'})
-        and defined($root->{'extra'}->{'perl_encoding'})
-        and !$self->{'perl_encoding'}) {
-      $self->{'encoding_name'} = $root->{'extra'}->{'encoding_name'};
-      $self->{'perl_encoding'} = $root->{'extra'}->{'perl_encoding'};
-      # the following does not work with shifijs.  The encoding
-      # has to be set only once by open_out. 
-      #if (defined($self->{'fh'})) {
-      #  my $encoding = $self->{'perl_encoding'};
-      #  my $filehandle = $self->{'fh'};
-      #  if ($encoding eq 'utf8' or $encoding eq 'utf-8-strict') {
-      #    binmode($filehandle, ':utf8');
-      #  } else { # FIXME also right for shiftijs or similar encodings?
-      #    binmode($filehandle, ':bytes');
-      #  }
-      #  binmode($filehandle, ":encoding($encoding)");
-      #}
-    }
-  } elsif ($root->{'extra'} and $root->{'extra'}->{'misc_args'} 
-           and exists($root->{'extra'}->{'misc_args'}->[0])) {
-    $self->set_conf($cmdname, $root->{'extra'}->{'misc_args'}->[0]);
-    if ($cmdname eq 'paragraphindent') {
-      if ($root->{'extra'}->{'misc_args'}->[0] eq 'asis') {
-        delete $self->{'ignored_types'}->{'empty_spaces_before_paragraph'};
-      } else {
-        $self->set_conf($cmdname, 0)
-          if ($root->{'extra'}->{'misc_args'}->[0] eq 'none');
-        $self->{'ignored_types'}->{'empty_spaces_before_paragraph'} = 1;
-      }
-    }
-  }
-}
-
 sub _defaults($)
 {
   return %defaults;
@@ -1069,7 +1012,9 @@
   # NUMBER_FOOTNOTES SPLIT_SIZE IN_ENCODING FILLCOLUMN ENABLE_ENCODING
   # OUT_ENCODING ENCODING_NAME
 
-  if (($root->{'type'} and $self->{'ignored_types'}->{$root->{'type'}})
+  if (($root->{'type'} and $self->{'ignored_types'}->{$root->{'type'}}
+       and ($root->{'type'} ne 'empty_spaces_before_paragraph'
+            or $self->get_conf('paragraphindent') ne 'asis'))
        or ($root->{'cmdname'} 
             and $self->{'ignored_commands'}->{$root->{'cmdname'}})) {
     print STDERR "IGNORED\n" if ($self->get_conf('DEBUG'));
@@ -2060,6 +2005,8 @@
                   or $self->get_conf('firstparagraphindent') eq 'insert') 
                and !$self->{'text_element_context'}->[-1]->{'counter'}))) {
         $conf->{'first_indent_length'} = $self->get_conf('paragraphindent');
+        $conf->{'first_indent_length'} = 0
+          if ($conf->{'first_indent_length'} eq 'none');
       }
       $paragraph = $self->new_formatter('paragraph', $conf);
       push @{$self->{'formatters'}}, $paragraph;

Index: t/converters_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/converters_tests.t,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- t/converters_tests.t        29 Sep 2011 22:12:55 -0000      1.6
+++ t/converters_tests.t        1 Oct 2011 15:14:22 -0000       1.7
@@ -242,6 +242,7 @@
 '],
 );
 
+# This should go to a file, not to code...
 my @html_text_cases = (
 ['accentenc_no_iso_no_entity',
 $latin1_accents_text, {}, {'ENABLE_ENCODING' => 1,
@@ -252,6 +253,8 @@
 foreach my $test (@test_cases) {
   push @{$test->[2]->{'test_formats'}}, 'plaintext';
   push @{$test->[2]->{'test_formats'}}, 'html_text';
+  #push @{$test->[2]->{'test_formats'}}, 'xml';
+  #push @{$test->[2]->{'test_formats'}}, 'docbook';
 }
 
 foreach my $test (@html_text_cases) {

Index: t/info_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/info_tests.t,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- t/info_tests.t      25 Sep 2011 22:07:13 -0000      1.33
+++ t/info_tests.t      1 Oct 2011 15:14:22 -0000       1.34
@@ -29,6 +29,23 @@
 @bye
 
 '],
+['paragraphindent_asis_first',
+'
+     bbb
+
address@hidden asis
+     ccc
+'],
+['paragraphindent_none_first',
+'
+      first
+
+      second
+
address@hidden none
+
+      after none
+'],
 ['space_at_menu_end',
 '@node Top
 

Index: t/results/info_tests/paragraphindent_asis_first.pl
===================================================================
RCS file: t/results/info_tests/paragraphindent_asis_first.pl
diff -N t/results/info_tests/paragraphindent_asis_first.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/info_tests/paragraphindent_asis_first.pl  1 Oct 2011 15:14:23 
-0000       1.1
@@ -0,0 +1,152 @@
+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{'paragraphindent_asis_first'} = {
+  'contents' => [
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'parent' => {},
+      'text' => '     ',
+      'type' => 'empty_spaces_before_paragraph'
+    },
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => 'bbb
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    },
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'extra' => {
+                'command' => {}
+              },
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'asis'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'spaces_at_end'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'paragraphindent',
+      'extra' => {
+        'misc_args' => [
+          'asis'
+        ]
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 4,
+        'macro' => ''
+      },
+      'parent' => {}
+    },
+    {
+      'parent' => {},
+      'text' => '     ',
+      'type' => 'empty_spaces_before_paragraph'
+    },
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => 'ccc
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'paragraphindent_asis_first'}{'contents'}[0]{'parent'} = 
$result_trees{'paragraphindent_asis_first'};
+$result_trees{'paragraphindent_asis_first'}{'contents'}[1]{'parent'} = 
$result_trees{'paragraphindent_asis_first'};
+$result_trees{'paragraphindent_asis_first'}{'contents'}[2]{'contents'}[0]{'parent'}
 = $result_trees{'paragraphindent_asis_first'}{'contents'}[2];
+$result_trees{'paragraphindent_asis_first'}{'contents'}[2]{'parent'} = 
$result_trees{'paragraphindent_asis_first'};
+$result_trees{'paragraphindent_asis_first'}{'contents'}[3]{'parent'} = 
$result_trees{'paragraphindent_asis_first'};
+$result_trees{'paragraphindent_asis_first'}{'contents'}[4]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'paragraphindent_asis_first'}{'contents'}[4];
+$result_trees{'paragraphindent_asis_first'}{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'paragraphindent_asis_first'}{'contents'}[4]{'args'}[0];
+$result_trees{'paragraphindent_asis_first'}{'contents'}[4]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'paragraphindent_asis_first'}{'contents'}[4]{'args'}[0];
+$result_trees{'paragraphindent_asis_first'}{'contents'}[4]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'paragraphindent_asis_first'}{'contents'}[4]{'args'}[0];
+$result_trees{'paragraphindent_asis_first'}{'contents'}[4]{'args'}[0]{'parent'}
 = $result_trees{'paragraphindent_asis_first'}{'contents'}[4];
+$result_trees{'paragraphindent_asis_first'}{'contents'}[4]{'parent'} = 
$result_trees{'paragraphindent_asis_first'};
+$result_trees{'paragraphindent_asis_first'}{'contents'}[5]{'parent'} = 
$result_trees{'paragraphindent_asis_first'};
+$result_trees{'paragraphindent_asis_first'}{'contents'}[6]{'contents'}[0]{'parent'}
 = $result_trees{'paragraphindent_asis_first'}{'contents'}[6];
+$result_trees{'paragraphindent_asis_first'}{'contents'}[6]{'parent'} = 
$result_trees{'paragraphindent_asis_first'};
+
+$result_texis{'paragraphindent_asis_first'} = '
+     bbb
+
address@hidden asis
+     ccc
+';
+
+
+$result_texts{'paragraphindent_asis_first'} = '
+bbb
+
+ccc
+';
+
+$result_errors{'paragraphindent_asis_first'} = [];
+
+
+
+$result_converted{'info'}->{'paragraphindent_asis_first'} = 'This is , 
produced by makeinfo version 4.13 from .
+
+bbb
+
+     ccc
+
+
+Tag Table:
+
+End Tag Table
+';
+
+$result_converted_errors{'info'}->{'paragraphindent_asis_first'} = [
+  {
+    'error_line' => 'warning: Document without nodes.
+',
+    'text' => 'Document without nodes.',
+    'type' => 'warning'
+  }
+];
+
+
+1;

Index: t/results/info_tests/paragraphindent_none_first.pl
===================================================================
RCS file: t/results/info_tests/paragraphindent_none_first.pl
diff -N t/results/info_tests/paragraphindent_none_first.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/info_tests/paragraphindent_none_first.pl  1 Oct 2011 15:14:23 
-0000       1.1
@@ -0,0 +1,193 @@
+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{'paragraphindent_none_first'} = {
+  'contents' => [
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'parent' => {},
+      'text' => '      ',
+      'type' => 'empty_spaces_before_paragraph'
+    },
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => 'first
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    },
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'parent' => {},
+      'text' => '      ',
+      'type' => 'empty_spaces_before_paragraph'
+    },
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => 'second
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    },
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'extra' => {
+                'command' => {}
+              },
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'none'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'spaces_at_end'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'paragraphindent',
+      'extra' => {
+        'misc_args' => [
+          'none'
+        ]
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 6,
+        'macro' => ''
+      },
+      'parent' => {}
+    },
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'parent' => {},
+      'text' => '      ',
+      'type' => 'empty_spaces_before_paragraph'
+    },
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => 'after none
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'paragraphindent_none_first'}{'contents'}[0]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[1]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[2]{'contents'}[0]{'parent'}
 = $result_trees{'paragraphindent_none_first'}{'contents'}[2];
+$result_trees{'paragraphindent_none_first'}{'contents'}[2]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[3]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[4]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[5]{'contents'}[0]{'parent'}
 = $result_trees{'paragraphindent_none_first'}{'contents'}[5];
+$result_trees{'paragraphindent_none_first'}{'contents'}[5]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[6]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[7]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'paragraphindent_none_first'}{'contents'}[7];
+$result_trees{'paragraphindent_none_first'}{'contents'}[7]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'paragraphindent_none_first'}{'contents'}[7]{'args'}[0];
+$result_trees{'paragraphindent_none_first'}{'contents'}[7]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'paragraphindent_none_first'}{'contents'}[7]{'args'}[0];
+$result_trees{'paragraphindent_none_first'}{'contents'}[7]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'paragraphindent_none_first'}{'contents'}[7]{'args'}[0];
+$result_trees{'paragraphindent_none_first'}{'contents'}[7]{'args'}[0]{'parent'}
 = $result_trees{'paragraphindent_none_first'}{'contents'}[7];
+$result_trees{'paragraphindent_none_first'}{'contents'}[7]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[8]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[9]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+$result_trees{'paragraphindent_none_first'}{'contents'}[10]{'contents'}[0]{'parent'}
 = $result_trees{'paragraphindent_none_first'}{'contents'}[10];
+$result_trees{'paragraphindent_none_first'}{'contents'}[10]{'parent'} = 
$result_trees{'paragraphindent_none_first'};
+
+$result_texis{'paragraphindent_none_first'} = '
+      first
+
+      second
+
address@hidden none
+
+      after none
+';
+
+
+$result_texts{'paragraphindent_none_first'} = '
+first
+
+second
+
+
+after none
+';
+
+$result_errors{'paragraphindent_none_first'} = [];
+
+
+
+$result_converted{'info'}->{'paragraphindent_none_first'} = 'This is , 
produced by makeinfo version 4.13 from .
+
+first
+
+   second
+
+after none
+
+
+Tag Table:
+
+End Tag Table
+';
+
+$result_converted_errors{'info'}->{'paragraphindent_none_first'} = [
+  {
+    'error_line' => 'warning: Document without nodes.
+',
+    'text' => 'Document without nodes.',
+    'type' => 'warning'
+  }
+];
+
+
+1;



reply via email to

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