[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp DebugTexinfo/DebugCount.pm t/results...
From: |
Patrice Dumas |
Subject: |
texinfo/tp DebugTexinfo/DebugCount.pm t/results... |
Date: |
Fri, 28 Jan 2011 07:24:42 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/01/28 07:24:41
Modified files:
tp/DebugTexinfo: DebugCount.pm
tp/t/results/test_count: commands.pl flushright.pl multitable.pl
Log message:
Fix and enhance debug count unit test driver class.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/DebugTexinfo/DebugCount.pm?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/test_count/commands.pl?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/test_count/flushright.pl?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/test_count/multitable.pl?cvsroot=texinfo&r1=1.1&r2=1.2
Patches:
Index: DebugTexinfo/DebugCount.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/DebugTexinfo/DebugCount.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- DebugTexinfo/DebugCount.pm 23 Jan 2011 23:50:56 -0000 1.1
+++ DebugTexinfo/DebugCount.pm 28 Jan 2011 07:24:41 -0000 1.2
@@ -44,11 +44,19 @@
my $text =
Texinfo::Convert::Plaintext::_convert($self, $root);
- my $locations_string = '';
+ my $all_locations_string = '';
if ($self->{'count_context'}->[-1]->{'locations'}) {
- my $location_string = '';
foreach my $location (@{$self->{'count_context'}->[-1]->{'locations'}}) {
- $location_string .= " l ";
+ my $location_nr;
+ if (defined($self->{'debug_location_counts'})
+ and defined ($self->{'debug_location_counts'}->{$location})) {
+ $location_nr = $self->{'debug_location_counts'}->{$location};
+ } else {
+ $self->{'debug_location_counter'}++;
+ $location_nr = $self->{'debug_location_counter'};
+ $self->{'debug_location_counts'}->{$location} = $location_nr;
+ }
+ my $location_string = '';
if (defined($location->{'lines'})) {
$location_string .= " l $location->{'lines'}";
}
@@ -58,19 +66,24 @@
if (defined($self->{'debug_locations_strings'}->{$location})) {
if ($self->{'debug_locations_strings'}->{$location} eq
$location_string) {
$location_string = '';
+ } else {
+ $self->{'debug_locations_strings'}->{$location} = $location_string;
+ $location_string = " ($location_nr)$location_string";
}
} else {
$self->{'debug_locations_strings'}->{$location} = $location_string;
+ $location_string = " ($location_nr)$location_string";
}
+ $all_locations_string .= $location_string if ($location_string);
}
- $locations_string .= $location_string ."\n" if ($location_string);
+ $all_locations_string .= "\n" if ($all_locations_string);
}
#push @{$self->{'debug_count_strings'}}, ' ' x $self->{'level'}. "TEXT:
$text|\n"
# if ($self->{'count_context'}->[-1]->{'bytes'} > $bytes_before);
my $number_after =
"($self->{'count_context'}->[-1]->{'bytes'},$self->{'count_context'}->[-1]->{'lines'})";
my $string_after = ' ' x $self->{'level'}. "$command_nr $number_after\n";
- $string_after .= " locations $locations_string"
- if ($locations_string ne '');
+ $string_after .= " locations $all_locations_string"
+ if ($all_locations_string ne '');
push @{$self->{'debug_count_strings'}}, $string_after;
$self->{'level'}--;
if ($self->{'level'} > 0) {
Index: t/results/test_count/commands.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/test_count/commands.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/results/test_count/commands.pl 23 Jan 2011 21:18:27 -0000 1.1
+++ t/results/test_count/commands.pl 28 Jan 2011 07:24:41 -0000 1.2
@@ -376,7 +376,7 @@
[25] (50,6)
[24] (50,6)
[23] (58,7)
- locations l l 7
+ locations (1) l 7
[28] (58,7) :empty_line:text
[28] (59,8)
[29] (59,8) :paragraph
Index: t/results/test_count/flushright.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/test_count/flushright.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/results/test_count/flushright.pl 23 Jan 2011 21:18:27 -0000 1.1
+++ t/results/test_count/flushright.pl 28 Jan 2011 07:24:41 -0000 1.2
@@ -344,62 +344,53 @@
[7] (6,0)
[8] (6,0) @anchor
[8] (6,0)
- locations l l 0 b 6
+ locations (1) l 0 b 6
[9] (6,0) :text
[9] (11,1)
[10] (11,1) :text
[10] (21,1)
[11] (21,1) @anchor
[11] (21,1)
- locations l l 1 b 21
+ locations (2) l 1 b 21
[12] (21,1) :text
[12] (25,1)
[13] (25,1) @anchor
[13] (25,1)
- locations l l 1 b 25
+ locations (3) l 1 b 25
[14] (25,1) :text
[14] (32,2)
[6] (143,3)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138
+ locations (1) l 1 b 68 (2) l 2 b 134 (3) l 2 b 138
[15] (143,3) :empty_line:text
[15] (144,4)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138
[16] (144,4) :paragraph
[17] (0,0) :text
[17] (4,1)
[18] (4,1) :text
[18] (9,2)
[16] (286,6)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138
[19] (286,6) :empty_line:text
[19] (287,7)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138
[20] (287,7) :paragraph
[21] (0,0) @anchor
[21] (0,0)
- locations l l 0 b 0
+ locations (4) l 0 b 0
[22] (0,0) :text
[22] (1,1)
[20] (288,8)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138 l l 7 b 287
+ locations (4) l 7 b 287
[23] (288,8) :empty_line:text
[23] (289,9)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138 l l 7 b 287
[24] (289,9) :paragraph
[25] (0,0) :text
[25] (10,1)
[24] (360,10)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138 l l 7 b 287
[26] (360,10) :empty_line:text
[26] (361,11)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138 l l 7 b 287
[3] (361,11)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138 l l 7 b 287
[27] (361,11) :empty_line_after_command:text
[27] (361,11)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138 l l 7 b 287
[1] (361,11)
- locations l l 1 b 68 l l 2 b 134 l l 2 b 138 l l 7 b 287
aaa bb ada
dad sff sd and dsdbf
Index: t/results/test_count/multitable.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/test_count/multitable.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/results/test_count/multitable.pl 23 Jan 2011 21:18:27 -0000 1.1
+++ t/results/test_count/multitable.pl 28 Jan 2011 07:24:41 -0000 1.2
@@ -414,7 +414,7 @@
[19] (2,0)
[20] (2,0) @anchor
[20] (2,0)
- locations l l 0 b 2
+ locations (1) l 0 b 2
[21] (2,0) :text
[21] (2,0)
[18] (3,1)
@@ -428,34 +428,29 @@
[24] (4,1)
[22] (1,1)
[11] (17,2)
- locations l l 1 b 9
+ locations (1) l 1 b 9
[26] (17,2) :row
[27] (17,2) @item
[28] (0,0) :empty_spaces_after_command:text
[28] (0,0)
[27] (17,2)
- locations l l 1 b 9
[29] (17,2) @tab
[30] (0,0) :empty_spaces_after_command:text
[30] (0,0)
[31] (0,0) :paragraph
[32] (0,0) @anchor
[32] (0,0)
- locations l l 0 b 0
+ locations (2) l 0 b 0
[33] (0,0) :text
[33] (0,0)
[31] (0,0)
[29] (17,2)
- locations l l 1 b 9
[26] (24,3)
- locations l l 1 b 9 l l 2 b 23
+ locations (2) l 2 b 23
[3] (24,3)
- locations l l 1 b 9 l l 2 b 23
[34] (24,3) :empty_line_after_command:text
[34] (24,3)
- locations l l 1 b 9 l l 2 b 23
[1] (24,3)
- locations l l 1 b 9 l l 2 b 23
aaa bb ccc
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp DebugTexinfo/DebugCount.pm t/results...,
Patrice Dumas <=