texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp Texinfo/Structuring.pm t/30sectionin...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Structuring.pm t/30sectionin...
Date: Sat, 17 Sep 2011 08:13:47 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/09/17 08:13:47

Modified files:
        tp/Texinfo     : Structuring.pm 
        tp/t           : 30sectioning.t 
Added files:
        tp/t/results/sectioning: 
                                 node_up_direction_for_top_with_manual.pl 

Log message:
        Handle rightly the case of default up for Top having a node and a 
manual to be
        compared with the actual up of Top without node name (or the reverse).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Structuring.pm?cvsroot=texinfo&r1=1.82&r2=1.83
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/30sectioning.t?cvsroot=texinfo&r1=1.55&r2=1.56
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/node_up_direction_for_top_with_manual.pl?cvsroot=texinfo&rev=1.1

Patches:
Index: Texinfo/Structuring.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Structuring.pm,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- Texinfo/Structuring.pm      15 Sep 2011 20:01:42 -0000      1.82
+++ Texinfo/Structuring.pm      17 Sep 2011 08:13:46 -0000      1.83
@@ -424,6 +424,9 @@
                     Texinfo::Parser::_node_extra_to_texi($node->{'extra'})), 
                        $node->{'line_nr'});
     }
+    #print STDERR "Processing "
+    #  .Texinfo::Parser::_node_extra_to_texi($node->{'extra'})."\n";
+   
     my $automatic_directions = 
       (scalar(@{$node->{'extra'}->{'nodes_manuals'}}) == 1);
 
@@ -487,7 +490,9 @@
               and $top_node_up->{'extra'}->{'manual_content'}
               and ((!defined($node_direction->{'normalized'})
                     and !defined($top_node_up->{'extra'}->{'normalized'}))
-                   or $node_direction->{'normalized'} eq 
$top_node_up->{'extra'}->{'normalized'})
+                   or (defined($node_direction->{'normalized'}) 
+                       and defined($top_node_up->{'extra'}->{'normalized'})
+                       and $node_direction->{'normalized'} eq 
$top_node_up->{'extra'}->{'normalized'}))
               and (Texinfo::Convert::NodeNameNormalization::normalize_node(
                      {'contents' => $node_direction->{'manual_content'}})
                   eq Texinfo::Convert::NodeNameNormalization::normalize_node(

Index: t/30sectioning.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/30sectioning.t,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- t/30sectioning.t    4 Sep 2011 20:43:07 -0000       1.55
+++ t/30sectioning.t    17 Sep 2011 08:13:46 -0000      1.56
@@ -889,6 +889,9 @@
 @node first
 ',{'TOP_NODE_UP' => ''}
 ],
+['node_up_direction_for_top_with_manual',
+'@node Top,,,(dir)top
+'],
 ['internal_top_node_up',
 '@node Top
 @top internal top node up

Index: t/results/sectioning/node_up_direction_for_top_with_manual.pl
===================================================================
RCS file: t/results/sectioning/node_up_direction_for_top_with_manual.pl
diff -N t/results/sectioning/node_up_direction_for_top_with_manual.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/sectioning/node_up_direction_for_top_with_manual.pl       17 Sep 
2011 08:13:46 -0000      1.1
@@ -0,0 +1,234 @@
+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{'node_up_direction_for_top_with_manual'} = {
+  'contents' => [
+    {
+      'contents' => [],
+      'parent' => {},
+      'type' => 'text_root'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'extra' => {
+                'command' => {}
+              },
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'Top'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        },
+        {
+          'contents' => [],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        },
+        {
+          'contents' => [],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => '(dir)top'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'spaces_at_end'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'contents' => [],
+      'extra' => {
+        'node_content' => [
+          {}
+        ],
+        'nodes_manuals' => [
+          {
+            'node_content' => [],
+            'normalized' => 'Top'
+          },
+          undef,
+          undef,
+          {
+            'manual_content' => [
+              {
+                'parent' => {},
+                'text' => 'dir'
+              }
+            ],
+            'node_content' => [
+              {
+                'parent' => {},
+                'text' => 'top'
+              }
+            ],
+            'normalized' => 'Top'
+          }
+        ],
+        'normalized' => 'Top'
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      },
+      'parent' => {}
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[0]{'parent'}
 = $result_trees{'node_up_direction_for_top_with_manual'};
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[0];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[0];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[0]{'parent'}
 = $result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[1]{'parent'}
 = $result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[2]{'parent'}
 = $result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[3]{'contents'}[0]{'parent'}
 = 
$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[3];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[3]{'contents'}[1]{'parent'}
 = 
$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[3];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[3]{'parent'}
 = $result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'extra'}{'node_content'}[0]
 = 
$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
 = 
$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'extra'}{'node_content'};
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'extra'}{'nodes_manuals'}[3]{'manual_content'}[0]{'parent'}
 = 
$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[3];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'extra'}{'nodes_manuals'}[3]{'node_content'}[0]{'parent'}
 = 
$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'args'}[3];
+$result_trees{'node_up_direction_for_top_with_manual'}{'contents'}[1]{'parent'}
 = $result_trees{'node_up_direction_for_top_with_manual'};
+
+$result_texis{'node_up_direction_for_top_with_manual'} = '@node Top,,,(dir)top
+';
+
+
+$result_texts{'node_up_direction_for_top_with_manual'} = '';
+
+$result_sectioning{'node_up_direction_for_top_with_manual'} = {};
+
+$result_nodes{'node_up_direction_for_top_with_manual'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'normalized' => 'Top'
+  },
+  'node_up' => {
+    'extra' => {
+      'manual_content' => [
+        {
+          'text' => 'dir'
+        }
+      ],
+      'normalized' => 'Top'
+    }
+  }
+};
+
+$result_menus{'node_up_direction_for_top_with_manual'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'normalized' => 'Top'
+  }
+};
+
+$result_errors{'node_up_direction_for_top_with_manual'} = [];
+
+
+
+$result_converted{'info'}->{'node_up_direction_for_top_with_manual'} = 'This 
is , produced by makeinfo version 4.13 from .
+
+
+File: ,  Node: Top,  Up: (dir)Top
+
+
+
+Tag Table:
+Node: Top52
+
+End Tag Table
+';
+
+
+$result_converted{'html'}->{'node_up_direction_for_top_with_manual'} = 
'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<!-- Created by texi2html, http://www.gnu.org/software/texinfo/ -->
+<head>
+<title>Untitled Document</title>
+
+<meta name="description" content="Untitled Document">
+<meta name="keywords" content="Untitled Document">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="texi2html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link href="#Top" rel="start" title="Top">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smalllisp {margin-left: 3.2em}
+pre.display {font-family: serif}
+pre.format {font-family: serif}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: serif; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: serif; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.nocodebreak {white-space:pre}
+span.nolinebreak {white-space:pre}
+span.roman {font-family:serif; font-weight:normal}
+span.sansserif {font-family:sans-serif; font-weight:normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" 
vlink="#800080" alink="#FF0000">
+
+<a name="Top"></a>
+<h1 class="node-heading">Top</h1>
+<hr>
+<p>
+
+
+</p>
+</body>
+</html>
+';
+
+$result_converted_errors{'html'}->{'node_up_direction_for_top_with_manual'} = [
+  {
+    'error_line' => 'warning: Must specify a title with a title command or @top
+',
+    'text' => 'Must specify a title with a title command or @top',
+    'type' => 'warning'
+  }
+];
+
+
+1;



reply via email to

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