texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp/t test_utils.pl results/coverage/blo...


From: Patrice Dumas
Subject: texinfo/tp/t test_utils.pl results/coverage/blo...
Date: Mon, 01 Nov 2010 09:09:21 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        10/11/01 09:09:21

Modified files:
        tp/t           : test_utils.pl 
        tp/t/results/coverage: block_commands.pl 
        tp/t/results/coverage_braces: caption_not_closed.pl 
        tp/t/results/sectioning: double_node_anchor_float.pl 

Log message:
        Add floats information to test suite.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/test_utils.pl?cvsroot=texinfo&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/block_commands.pl?cvsroot=texinfo&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/caption_not_closed.pl?cvsroot=texinfo&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/double_node_anchor_float.pl?cvsroot=texinfo&r1=1.7&r2=1.8

Patches:
Index: test_utils.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/test_utils.pl,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- test_utils.pl       1 Nov 2010 09:00:20 -0000       1.41
+++ test_utils.pl       1 Nov 2010 09:09:20 -0000       1.42
@@ -145,6 +145,16 @@
 sub filter_menus_keys { [grep {!$avoided_keys_menus{$_}}
    ( sort keys %{$_[0]} )] }
 
+my %avoided_keys_floats;
+my @avoided_keys_floats = (@sections_keys, @contents_keys, @node_keys, 
+                           @menus_keys);
+foreach my $avoided_key(@avoided_keys_floats) {
+  $avoided_keys_floats{$avoided_key} = 1;
+}
+sub filter_floats_keys { [grep {!$avoided_keys_floats{$_}}
+   ( sort keys %{$_[0]} )] }
+
+
 sub test($$) 
 {
   my $self = shift;
@@ -245,11 +255,11 @@
       $out_result .= Data::Dumper->Dump([$indices], 
['$result_indices{\''.$test_name.'\'}']) ."\n\n"
          if ($indices);
     }
-    #if ($floats)
-    #{
-    #  local $Data::Dumper::Sortkeys = 1;
-    #  $out_result .= Data::Dumper->Dump([$floats], 
['$result_floats{\''.$test_name.'\'}']) ."\n\n";
-    #}
+    if ($floats)
+    {
+      local $Data::Dumper::Sortkeys = \&filter_floats_keys;
+      $out_result .= Data::Dumper->Dump([$floats], 
['$result_floats{\''.$test_name.'\'}']) ."\n\n";
+    }
     $out_result .= "1;\n";
     print OUT $out_result;
     close (OUT);

Index: results/coverage/block_commands.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/block_commands.pl,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- results/coverage/block_commands.pl  1 Nov 2010 09:01:02 -0000       1.20
+++ results/coverage/block_commands.pl  1 Nov 2010 09:09:20 -0000       1.21
@@ -315,4 +315,31 @@
 $result_errors{'block_commands'} = [];
 
 
+$result_floats{'block_commands'} = {
+  'a-float' => [
+    {
+      'cmdname' => 'float',
+      'extra' => {
+        'caption' => {
+          'cmdname' => 'caption',
+          'extra' => {
+            'float' => {}
+          }
+        },
+        'normalized' => 'b-float',
+        'type' => {
+          'content' => [
+            {
+              'text' => 'a float'
+            }
+          ],
+          'normalized' => 'a-float'
+        }
+      }
+    }
+  ]
+};
+$result_floats{'block_commands'}{'a-float'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'block_commands'}{'a-float'}[0];
+
+
 1;

Index: results/coverage_braces/caption_not_closed.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/coverage_braces/caption_not_closed.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- results/coverage_braces/caption_not_closed.pl       1 Nov 2010 09:01:02 
-0000       1.10
+++ results/coverage_braces/caption_not_closed.pl       1 Nov 2010 09:09:20 
-0000       1.11
@@ -193,4 +193,30 @@
 ];
 
 
+$result_floats{'caption_not_closed'} = {
+  'Text' => [
+    {
+      'cmdname' => 'float',
+      'extra' => {
+        'caption' => {
+          'cmdname' => 'caption',
+          'extra' => {
+            'float' => {}
+          }
+        },
+        'type' => {
+          'content' => [
+            {
+              'text' => 'Text'
+            }
+          ],
+          'normalized' => 'Text'
+        }
+      }
+    }
+  ]
+};
+$result_floats{'caption_not_closed'}{'Text'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'caption_not_closed'}{'Text'}[0];
+
+
 1;

Index: results/sectioning/double_node_anchor_float.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/sectioning/double_node_anchor_float.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- results/sectioning/double_node_anchor_float.pl      1 Nov 2010 09:01:11 
-0000       1.7
+++ results/sectioning/double_node_anchor_float.pl      1 Nov 2010 09:09:20 
-0000       1.8
@@ -731,4 +731,50 @@
 ];
 
 
+$result_floats{'double_node_anchor_float'} = {
+  'Text' => [
+    {
+      'cmdname' => 'float',
+      'extra' => {
+        'type' => {
+          'content' => [
+            {
+              'text' => 'Text'
+            }
+          ],
+          'normalized' => 'Text'
+        }
+      }
+    },
+    {
+      'cmdname' => 'float',
+      'extra' => {
+        'type' => {
+          'content' => [
+            {
+              'text' => 'Text'
+            }
+          ],
+          'normalized' => 'Text'
+        }
+      }
+    },
+    {
+      'cmdname' => 'float',
+      'extra' => {
+        'normalized' => 'float1',
+        'type' => {
+          'content' => [
+            {
+              'text' => 'Text'
+            }
+          ],
+          'normalized' => 'Text'
+        }
+      }
+    }
+  ]
+};
+
+
 1;



reply via email to

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