texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp TODO Texinfo/Parser.pm t/09indices.t...


From: Patrice Dumas
Subject: texinfo/tp TODO Texinfo/Parser.pm t/09indices.t...
Date: Sun, 24 Oct 2010 20:13:36 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        10/10/24 20:13:36

Modified files:
        tp             : TODO 
        tp/Texinfo     : Parser.pm 
Added files:
        tp/t           : 09indices.t 
        tp/t/results/indices: recursive_synindex.pl 
                              unknown_index_entry.pl 
                              unknown_printindex.pl unknown_synindex.pl 
                              unknown_then_known_index_entry.pl 
                              wrong_synindex.pl 

Log message:
        Don't generate printindex or synindex arguments if there is a problem.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.107&r2=1.108
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/09indices.t?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/indices/recursive_synindex.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/indices/unknown_index_entry.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/indices/unknown_printindex.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/indices/unknown_synindex.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/indices/unknown_then_known_index_entry.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/indices/wrong_synindex.pl?cvsroot=texinfo&rev=1.1

Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- TODO        24 Oct 2010 16:22:02 -0000      1.40
+++ TODO        24 Oct 2010 20:13:36 -0000      1.41
@@ -64,6 +64,10 @@
 error_in_footnote_caption.texi
 tex_in_copying.texi               (this is not invalid)
 
+partly done:
+indices/recursive_synindex.texi (only done: @synindex aaa bbb
+                                            @synindex bbb aaa)
+
 done:
 formatting/def_end_of_line.texi
 formatting/def_end_of_line_footnote.texi
@@ -71,6 +75,9 @@
 formatting/def_cmds.texi (but printindex not tested)
 formatting/paragraph_in_samp.texi
 
+indices/unknown_index_entry.texi
+indices/more_unknown_index_entry.texi (but without the document structure)
+
 invalid/at_after_accent_command.texi
 invalid/bad_nesting.texi
 invalid/bad_style_nesting.texi

Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- Texinfo/Parser.pm   24 Oct 2010 19:08:31 -0000      1.107
+++ Texinfo/Parser.pm   24 Oct 2010 20:13:36 -0000      1.108
@@ -3095,7 +3095,6 @@
         unless $self->{'index_names'}->{$index_to};
       if ($self->{'index_names'}->{$index_from} 
            and $self->{'index_names'}->{$index_to}) {
-        $args = [$index_from, $index_to];
         my $current_to = $index_to;
         # find the merged indices recursively avoiding loops
         while ($current_to ne $index_from 
@@ -3109,6 +3108,10 @@
           foreach my $prefix (keys(%{$self->{'index_names'}->{$index_from}})) {
             $self->{'index_names'}->{$current_to}->{$prefix} = $in_code;
           }
+          $args = [$index_from, $index_to];
+        } else {
+          _line_warn ($self, sprintf($self->__("address@hidden leads to a 
merging of %s in itself, ignoring"), 
+                             $command, $index_from), $line_nr);
         }
       }
     } else {
@@ -3121,8 +3124,10 @@
       if (!exists($self->{'index_names'}->{$name})) {
         _line_error ($self, sprintf($self->__("Unknown index `%s' in 
address@hidden"),
                                     $name), $line_nr);
-      }
+      
+      } else {
       $args = [$name];
+      }
     } else {
       _line_error ($self, sprintf($self->
                    __("Bad argument to address@hidden: %s"), $command, $line), 
$line_nr);

Index: t/09indices.t
===================================================================
RCS file: t/09indices.t
diff -N t/09indices.t
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/09indices.t       24 Oct 2010 20:13:36 -0000      1.1
@@ -0,0 +1,33 @@
+use strict;
+
+require 't/test_utils.pl';
+
+my @test_cases = (
+['wrong_synindex',
+'@defindex aaa
address@hidden aaa aaa'],
+['recursive_synindex',
+'@defindex aaa
address@hidden bbb
address@hidden aaa bbb
address@hidden bbb aaa'],
+['unknown_index_entry',
+'@someindex someindex entry.
+'],
+['unknown_then_known_index_entry',
+'@someindex someindex entry.
address@hidden some
address@hidden someindex entry.
+'],
+['unknown_printindex',
+'@printindex bidule'],
+['unknown_synindex',
+'@synindex c truc']
+
+);
+
+our ($arg_test_case, $arg_generate, $arg_debug);
+
+run_all ('indices', address@hidden, $arg_test_case,
+   $arg_generate, $arg_debug);
+

Index: t/results/indices/recursive_synindex.pl
===================================================================
RCS file: t/results/indices/recursive_synindex.pl
diff -N t/results/indices/recursive_synindex.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/indices/recursive_synindex.pl     24 Oct 2010 20:13:36 -0000      
1.1
@@ -0,0 +1,207 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
%results_indices);
+
+$result_trees{'recursive_synindex'} = {
+  'contents' => [
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'aaa'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'spaces_at_end'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'defindex',
+      'parent' => {},
+      'special' => {
+        'misc_args' => [
+          'aaa'
+        ]
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'bbb'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'spaces_at_end'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'defindex',
+      'parent' => {},
+      'special' => {
+        'misc_args' => [
+          'bbb'
+        ]
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'aaa bbb'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'spaces_at_end'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'synindex',
+      'parent' => {},
+      'special' => {
+        'misc_args' => [
+          'aaa',
+          'bbb'
+        ]
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'bbb aaa'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'synindex',
+      'parent' => {}
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'recursive_synindex'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[0]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[0]{'args'}[0]{'parent'} = 
$result_trees{'recursive_synindex'}{'contents'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[0]{'parent'} = 
$result_trees{'recursive_synindex'};
+$result_trees{'recursive_synindex'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[1]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[1]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[1]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[1]{'args'}[0]{'parent'} = 
$result_trees{'recursive_synindex'}{'contents'}[1];
+$result_trees{'recursive_synindex'}{'contents'}[1]{'parent'} = 
$result_trees{'recursive_synindex'};
+$result_trees{'recursive_synindex'}{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[2]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[2]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[2]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[2]{'args'}[0]{'parent'} = 
$result_trees{'recursive_synindex'}{'contents'}[2];
+$result_trees{'recursive_synindex'}{'contents'}[2]{'parent'} = 
$result_trees{'recursive_synindex'};
+$result_trees{'recursive_synindex'}{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[3]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[3]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'recursive_synindex'}{'contents'}[3]{'args'}[0];
+$result_trees{'recursive_synindex'}{'contents'}[3]{'args'}[0]{'parent'} = 
$result_trees{'recursive_synindex'}{'contents'}[3];
+$result_trees{'recursive_synindex'}{'contents'}[3]{'parent'} = 
$result_trees{'recursive_synindex'};
+
+$result_texis{'recursive_synindex'} = '@defindex aaa
address@hidden bbb
address@hidden aaa bbb
address@hidden bbb aaa';
+
+
+$result_texts{'recursive_synindex'} = '';
+
+$result_errors{'recursive_synindex'} = [
+  {
+    'error_line' => ':4: warning: @synindex leads to a merging of bbb in 
itself, ignoring
+',
+    'file_name' => '',
+    'line_nr' => 4,
+    'macro' => '',
+    'text' => '@synindex leads to a merging of bbb in itself, ignoring',
+    'type' => 'warning'
+  }
+];
+
+
+$result_indices{'recursive_synindex'} = {
+  'index_names' => {
+    'aaa' => {
+      'aaa' => 0
+    },
+    'bbb' => {
+      'aaa' => 0,
+      'bbb' => 0
+    },
+    'cp' => {
+      'c' => 0,
+      'cp' => 0
+    },
+    'fn' => {
+      'f' => 1,
+      'fn' => 1
+    },
+    'ky' => {
+      'k' => 1,
+      'ky' => 1
+    },
+    'pg' => {
+      'p' => 1,
+      'pg' => 1
+    },
+    'tp' => {
+      't' => 1,
+      'tp' => 1
+    },
+    'vr' => {
+      'v' => 1,
+      'vr' => 1
+    }
+  },
+  'merged_indices' => {
+    'aaa' => 'bbb'
+  }
+};
+
+
+1;

Index: t/results/indices/unknown_index_entry.pl
===================================================================
RCS file: t/results/indices/unknown_index_entry.pl
diff -N t/results/indices/unknown_index_entry.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/indices/unknown_index_entry.pl    24 Oct 2010 20:13:36 -0000      
1.1
@@ -0,0 +1,45 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
%results_indices);
+
+$result_trees{'unknown_index_entry'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => ' someindex entry.
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'unknown_index_entry'}{'contents'}[0]{'contents'}[0]{'parent'} = 
$result_trees{'unknown_index_entry'}{'contents'}[0];
+$result_trees{'unknown_index_entry'}{'contents'}[0]{'parent'} = 
$result_trees{'unknown_index_entry'};
+
+$result_texis{'unknown_index_entry'} = ' someindex entry.
+';
+
+
+$result_texts{'unknown_index_entry'} = ' someindex entry.
+';
+
+$result_errors{'unknown_index_entry'} = [
+  {
+    'error_line' => ':1: Unknown command `someindex\'
+',
+    'file_name' => '',
+    'line_nr' => 1,
+    'macro' => '',
+    'text' => 'Unknown command `someindex\'',
+    'type' => 'error'
+  }
+];
+
+
+$result_indices{'unknown_index_entry'} = undef;
+
+
+1;

Index: t/results/indices/unknown_printindex.pl
===================================================================
RCS file: t/results/indices/unknown_printindex.pl
diff -N t/results/indices/unknown_printindex.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/indices/unknown_printindex.pl     24 Oct 2010 20:13:36 -0000      
1.1
@@ -0,0 +1,55 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
%results_indices);
+
+$result_trees{'unknown_printindex'} = {
+  'contents' => [
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'bidule'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'printindex',
+      'parent' => {}
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'unknown_printindex'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'unknown_printindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'unknown_printindex'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'unknown_printindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'unknown_printindex'}{'contents'}[0]{'args'}[0]{'parent'} = 
$result_trees{'unknown_printindex'}{'contents'}[0];
+$result_trees{'unknown_printindex'}{'contents'}[0]{'parent'} = 
$result_trees{'unknown_printindex'};
+
+$result_texis{'unknown_printindex'} = '@printindex bidule';
+
+
+$result_texts{'unknown_printindex'} = '';
+
+$result_errors{'unknown_printindex'} = [
+  {
+    'error_line' => ':1: Unknown index `bidule\' in @printindex
+',
+    'file_name' => '',
+    'line_nr' => 1,
+    'macro' => '',
+    'text' => 'Unknown index `bidule\' in @printindex',
+    'type' => 'error'
+  }
+];
+
+
+$result_indices{'unknown_printindex'} = undef;
+
+
+1;

Index: t/results/indices/unknown_synindex.pl
===================================================================
RCS file: t/results/indices/unknown_synindex.pl
diff -N t/results/indices/unknown_synindex.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/indices/unknown_synindex.pl       24 Oct 2010 20:13:36 -0000      
1.1
@@ -0,0 +1,64 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
%results_indices);
+
+$result_trees{'unknown_synindex'} = {
+  'contents' => [
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'c truc'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'synindex',
+      'parent' => {}
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'unknown_synindex'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'unknown_synindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'unknown_synindex'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'unknown_synindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'unknown_synindex'}{'contents'}[0]{'args'}[0]{'parent'} = 
$result_trees{'unknown_synindex'}{'contents'}[0];
+$result_trees{'unknown_synindex'}{'contents'}[0]{'parent'} = 
$result_trees{'unknown_synindex'};
+
+$result_texis{'unknown_synindex'} = '@synindex c truc';
+
+
+$result_texts{'unknown_synindex'} = '';
+
+$result_errors{'unknown_synindex'} = [
+  {
+    'error_line' => ':1: Unknown from index `c\' in @synindex
+',
+    'file_name' => '',
+    'line_nr' => 1,
+    'macro' => '',
+    'text' => 'Unknown from index `c\' in @synindex',
+    'type' => 'error'
+  },
+  {
+    'error_line' => ':1: Unknown to index name `truc\' in @synindex
+',
+    'file_name' => '',
+    'line_nr' => 1,
+    'macro' => '',
+    'text' => 'Unknown to index name `truc\' in @synindex',
+    'type' => 'error'
+  }
+];
+
+
+$result_indices{'unknown_synindex'} = undef;
+
+
+1;

Index: t/results/indices/unknown_then_known_index_entry.pl
===================================================================
RCS file: t/results/indices/unknown_then_known_index_entry.pl
diff -N t/results/indices/unknown_then_known_index_entry.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/indices/unknown_then_known_index_entry.pl 24 Oct 2010 20:13:36 
-0000      1.1
@@ -0,0 +1,146 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
%results_indices);
+
+$result_trees{'unknown_then_known_index_entry'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => ' someindex entry.
+'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => ' ',
+                  'type' => 'empty_spaces_after_command'
+                },
+                {
+                  'parent' => {},
+                  'text' => 'some'
+                },
+                {
+                  'parent' => {},
+                  'text' => '
+',
+                  'type' => 'spaces_at_end'
+                }
+              ],
+              'parent' => {},
+              'type' => 'misc_line_arg'
+            }
+          ],
+          'cmdname' => 'defindex',
+          'parent' => {},
+          'special' => {
+            'misc_args' => [
+              'some'
+            ]
+          }
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => ' ',
+                  'type' => 'empty_spaces_after_command'
+                },
+                {
+                  'parent' => {},
+                  'text' => 'someindex entry.'
+                },
+                {
+                  'parent' => {},
+                  'text' => '
+',
+                  'type' => 'spaces_at_end'
+                }
+              ],
+              'parent' => {},
+              'type' => 'misc_line_arg'
+            }
+          ],
+          'cmdname' => 'someindex',
+          'parent' => {}
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'unknown_then_known_index_entry'}{'contents'}[0];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'unknown_then_known_index_entry'}{'contents'}[0];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'unknown_then_known_index_entry'}{'contents'}[0];
+$result_trees{'unknown_then_known_index_entry'}{'contents'}[0]{'parent'} = 
$result_trees{'unknown_then_known_index_entry'};
+
+$result_texis{'unknown_then_known_index_entry'} = ' someindex entry.
address@hidden some
address@hidden someindex entry.
+';
+
+
+$result_texts{'unknown_then_known_index_entry'} = ' someindex entry.
+';
+
+$result_errors{'unknown_then_known_index_entry'} = [
+  {
+    'error_line' => ':1: Unknown command `someindex\'
+',
+    'file_name' => '',
+    'line_nr' => 1,
+    'macro' => '',
+    'text' => 'Unknown command `someindex\'',
+    'type' => 'error'
+  }
+];
+
+
+$result_indices{'unknown_then_known_index_entry'} = {
+  'index_names' => {
+    'cp' => {
+      'c' => 0,
+      'cp' => 0
+    },
+    'fn' => {
+      'f' => 1,
+      'fn' => 1
+    },
+    'ky' => {
+      'k' => 1,
+      'ky' => 1
+    },
+    'pg' => {
+      'p' => 1,
+      'pg' => 1
+    },
+    'some' => {
+      'some' => 0
+    },
+    'tp' => {
+      't' => 1,
+      'tp' => 1
+    },
+    'vr' => {
+      'v' => 1,
+      'vr' => 1
+    }
+  }
+};
+
+
+1;

Index: t/results/indices/wrong_synindex.pl
===================================================================
RCS file: t/results/indices/wrong_synindex.pl
diff -N t/results/indices/wrong_synindex.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/indices/wrong_synindex.pl 24 Oct 2010 20:13:36 -0000      1.1
@@ -0,0 +1,123 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
%results_indices);
+
+$result_trees{'wrong_synindex'} = {
+  'contents' => [
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'aaa'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'spaces_at_end'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'defindex',
+      'parent' => {},
+      'special' => {
+        'misc_args' => [
+          'aaa'
+        ]
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'aaa aaa'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'synindex',
+      'parent' => {}
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'wrong_synindex'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'wrong_synindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'wrong_synindex'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'wrong_synindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'wrong_synindex'}{'contents'}[0]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'wrong_synindex'}{'contents'}[0]{'args'}[0];
+$result_trees{'wrong_synindex'}{'contents'}[0]{'args'}[0]{'parent'} = 
$result_trees{'wrong_synindex'}{'contents'}[0];
+$result_trees{'wrong_synindex'}{'contents'}[0]{'parent'} = 
$result_trees{'wrong_synindex'};
+$result_trees{'wrong_synindex'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'wrong_synindex'}{'contents'}[1]{'args'}[0];
+$result_trees{'wrong_synindex'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'wrong_synindex'}{'contents'}[1]{'args'}[0];
+$result_trees{'wrong_synindex'}{'contents'}[1]{'args'}[0]{'parent'} = 
$result_trees{'wrong_synindex'}{'contents'}[1];
+$result_trees{'wrong_synindex'}{'contents'}[1]{'parent'} = 
$result_trees{'wrong_synindex'};
+
+$result_texis{'wrong_synindex'} = '@defindex aaa
address@hidden aaa aaa';
+
+
+$result_texts{'wrong_synindex'} = '';
+
+$result_errors{'wrong_synindex'} = [
+  {
+    'error_line' => ':2: warning: @synindex leads to a merging of aaa in 
itself, ignoring
+',
+    'file_name' => '',
+    'line_nr' => 2,
+    'macro' => '',
+    'text' => '@synindex leads to a merging of aaa in itself, ignoring',
+    'type' => 'warning'
+  }
+];
+
+
+$result_indices{'wrong_synindex'} = {
+  'index_names' => {
+    'aaa' => {
+      'aaa' => 0
+    },
+    'cp' => {
+      'c' => 0,
+      'cp' => 0
+    },
+    'fn' => {
+      'f' => 1,
+      'fn' => 1
+    },
+    'ky' => {
+      'k' => 1,
+      'ky' => 1
+    },
+    'pg' => {
+      'p' => 1,
+      'pg' => 1
+    },
+    'tp' => {
+      't' => 1,
+      'tp' => 1
+    },
+    'vr' => {
+      'v' => 1,
+      'vr' => 1
+    }
+  }
+};
+
+
+1;



reply via email to

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