[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Parser.pm t/09indices.t t/re...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Parser.pm t/09indices.t t/re... |
Date: |
Sun, 24 Oct 2010 20:28:44 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 10/10/24 20:28:44
Modified files:
tp/Texinfo : Parser.pm
tp/t : 09indices.t
tp/t/results/macro: macro_in_index_commands.pl
tp/t/results/value: value_in_index_commands.pl
Added files:
tp/t/results/indices: print_merged_index.pl
Log message:
Warn if a merged index is printed.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.108&r2=1.109
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/09indices.t?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/indices/print_merged_index.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/macro/macro_in_index_commands.pl?cvsroot=texinfo&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/value/value_in_index_commands.pl?cvsroot=texinfo&r1=1.9&r2=1.10
Patches:
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -b -r1.108 -r1.109
--- Texinfo/Parser.pm 24 Oct 2010 20:13:36 -0000 1.108
+++ Texinfo/Parser.pm 24 Oct 2010 20:28:43 -0000 1.109
@@ -173,7 +173,6 @@
# formatting
'center' => 'line',
- # FIXME Verify the index exists?
'printindex' => 1,
'listoffloats' => 'line',
# especially in titlepage
@@ -3126,6 +3125,11 @@
$name), $line_nr);
} else {
+ if ($self->{'merged_indices'}->{$name}) {
+ _line_warn ($self, sprintf($self->__("Printing an index `%s' merged
in another one `%s'"),
+ $name,
$self->{'merged_indices'}->{$name}),
+ $line_nr);
+ }
$args = [$name];
}
} else {
Index: t/09indices.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/09indices.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/09indices.t 24 Oct 2010 20:13:36 -0000 1.1
+++ t/09indices.t 24 Oct 2010 20:28:43 -0000 1.2
@@ -22,7 +22,10 @@
['unknown_printindex',
'@printindex bidule'],
['unknown_synindex',
-'@synindex c truc']
+'@synindex c truc'],
+['print_merged_index',
+'@syncodeindex fn cp
address@hidden fn']
);
Index: t/results/macro/macro_in_index_commands.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/macro/macro_in_index_commands.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- t/results/macro/macro_in_index_commands.pl 24 Oct 2010 19:23:41 -0000
1.11
+++ t/results/macro/macro_in_index_commands.pl 24 Oct 2010 20:28:44 -0000
1.12
@@ -1924,6 +1924,69 @@
'macro' => '',
'text' => '@documentlanguage should only appear at a line beginning',
'type' => 'warning'
+ },
+ {
+ 'error_line' => ':76: warning: Printing an index `ky\' merged in another
one `pg\'
+',
+ 'file_name' => '',
+ 'line_nr' => 76,
+ 'macro' => '',
+ 'text' => 'Printing an index `ky\' merged in another one `pg\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':79: warning: Printing an index `truc\' merged in another
one `fn\'
+',
+ 'file_name' => '',
+ 'line_nr' => 79,
+ 'macro' => '',
+ 'text' => 'Printing an index `truc\' merged in another one `fn\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':82: warning: Printing an index `truc\' merged in another
one `fn\'
+',
+ 'file_name' => '',
+ 'line_nr' => 82,
+ 'macro' => '',
+ 'text' => 'Printing an index `truc\' merged in another one `fn\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':85: warning: Printing an index `cp\' merged in another
one `fn\'
+',
+ 'file_name' => '',
+ 'line_nr' => 85,
+ 'macro' => '',
+ 'text' => 'Printing an index `cp\' merged in another one `fn\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':88: warning: Printing an index `cp\' merged in another
one `fn\'
+',
+ 'file_name' => '',
+ 'line_nr' => 88,
+ 'macro' => '',
+ 'text' => 'Printing an index `cp\' merged in another one `fn\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':91: warning: Printing an index `defg\' merged in another
one `pg\'
+',
+ 'file_name' => '',
+ 'line_nr' => 91,
+ 'macro' => '',
+ 'text' => 'Printing an index `defg\' merged in another one `pg\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':94: warning: Printing an index `abc\' merged in another
one `defg\'
+',
+ 'file_name' => '',
+ 'line_nr' => 94,
+ 'macro' => '',
+ 'text' => 'Printing an index `abc\' merged in another one `defg\'',
+ 'type' => 'warning'
}
];
Index: t/results/value/value_in_index_commands.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/value/value_in_index_commands.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- t/results/value/value_in_index_commands.pl 24 Oct 2010 19:23:41 -0000
1.9
+++ t/results/value/value_in_index_commands.pl 24 Oct 2010 20:28:44 -0000
1.10
@@ -1607,7 +1607,71 @@
fn
';
-$result_errors{'value_in_index_commands'} = [];
+$result_errors{'value_in_index_commands'} = [
+ {
+ 'error_line' => ':49: warning: Printing an index `ky\' merged in another
one `pg\'
+',
+ 'file_name' => '',
+ 'line_nr' => 49,
+ 'macro' => '',
+ 'text' => 'Printing an index `ky\' merged in another one `pg\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':52: warning: Printing an index `truc\' merged in another
one `fn\'
+',
+ 'file_name' => '',
+ 'line_nr' => 52,
+ 'macro' => '',
+ 'text' => 'Printing an index `truc\' merged in another one `fn\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':55: warning: Printing an index `truc\' merged in another
one `fn\'
+',
+ 'file_name' => '',
+ 'line_nr' => 55,
+ 'macro' => '',
+ 'text' => 'Printing an index `truc\' merged in another one `fn\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':58: warning: Printing an index `cp\' merged in another
one `fn\'
+',
+ 'file_name' => '',
+ 'line_nr' => 58,
+ 'macro' => '',
+ 'text' => 'Printing an index `cp\' merged in another one `fn\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':61: warning: Printing an index `cp\' merged in another
one `fn\'
+',
+ 'file_name' => '',
+ 'line_nr' => 61,
+ 'macro' => '',
+ 'text' => 'Printing an index `cp\' merged in another one `fn\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':64: warning: Printing an index `defg\' merged in another
one `pg\'
+',
+ 'file_name' => '',
+ 'line_nr' => 64,
+ 'macro' => '',
+ 'text' => 'Printing an index `defg\' merged in another one `pg\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':67: warning: Printing an index `abc\' merged in another
one `defg\'
+',
+ 'file_name' => '',
+ 'line_nr' => 67,
+ 'macro' => '',
+ 'text' => 'Printing an index `abc\' merged in another one `defg\'',
+ 'type' => 'warning'
+ }
+];
$result_indices{'value_in_index_commands'} = {
Index: t/results/indices/print_merged_index.pl
===================================================================
RCS file: t/results/indices/print_merged_index.pl
diff -N t/results/indices/print_merged_index.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/indices/print_merged_index.pl 24 Oct 2010 20:28:44 -0000
1.1
@@ -0,0 +1,103 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
%results_indices);
+
+$result_trees{'print_merged_index'} = {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'fn cp'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'syncodeindex',
+ 'parent' => {},
+ 'special' => {
+ 'misc_args' => [
+ 'fn',
+ 'cp'
+ ]
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'fn'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'printindex',
+ 'parent' => {},
+ 'special' => {
+ 'misc_args' => [
+ 'fn'
+ ]
+ }
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'print_merged_index'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'print_merged_index'}{'contents'}[0]{'args'}[0];
+$result_trees{'print_merged_index'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'print_merged_index'}{'contents'}[0]{'args'}[0];
+$result_trees{'print_merged_index'}{'contents'}[0]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'print_merged_index'}{'contents'}[0]{'args'}[0];
+$result_trees{'print_merged_index'}{'contents'}[0]{'args'}[0]{'parent'} =
$result_trees{'print_merged_index'}{'contents'}[0];
+$result_trees{'print_merged_index'}{'contents'}[0]{'parent'} =
$result_trees{'print_merged_index'};
+$result_trees{'print_merged_index'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'print_merged_index'}{'contents'}[1]{'args'}[0];
+$result_trees{'print_merged_index'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'print_merged_index'}{'contents'}[1]{'args'}[0];
+$result_trees{'print_merged_index'}{'contents'}[1]{'args'}[0]{'parent'} =
$result_trees{'print_merged_index'}{'contents'}[1];
+$result_trees{'print_merged_index'}{'contents'}[1]{'parent'} =
$result_trees{'print_merged_index'};
+
+$result_texis{'print_merged_index'} = '@syncodeindex fn cp
address@hidden fn';
+
+
+$result_texts{'print_merged_index'} = '';
+
+$result_errors{'print_merged_index'} = [
+ {
+ 'error_line' => ':2: warning: Printing an index `fn\' merged in another
one `cp\'
+',
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => '',
+ 'text' => 'Printing an index `fn\' merged in another one `cp\'',
+ 'type' => 'warning'
+ }
+];
+
+
+$result_indices{'print_merged_index'} = {
+ 'merged_indices' => {
+ 'fn' => 'cp'
+ }
+};
+
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp Texinfo/Parser.pm t/09indices.t t/re...,
Patrice Dumas <=