[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Convert/Line.pm Texinfo/Conv...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Convert/Line.pm Texinfo/Conv... |
Date: |
Thu, 03 Feb 2011 23:38:02 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/02/03 23:38:02
Modified files:
tp/Texinfo/Convert: Line.pm Paragraph.pm Plaintext.pm
UnFilled.pm
tp/t : 02coverage.t 03coverage_braces.t
57invalid_nestings.t info_tests.t test_utils.pl
tp/t/results/coverage_braces: nested_args.pl
Added files:
tp/t/results/info_tests: ref_tests.pl xref_test.pl
tp/t/results/invalid_nestings: table_in_code.pl
Log message:
Handle better @ref and @xref and punctuation.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Line.pm?cvsroot=texinfo&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Paragraph.pm?cvsroot=texinfo&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.62&r2=1.63
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/UnFilled.pm?cvsroot=texinfo&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/02coverage.t?cvsroot=texinfo&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/03coverage_braces.t?cvsroot=texinfo&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/57invalid_nestings.t?cvsroot=texinfo&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/info_tests.t?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/test_utils.pl?cvsroot=texinfo&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/nested_args.pl?cvsroot=texinfo&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/ref_tests.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/xref_test.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/invalid_nestings/table_in_code.pl?cvsroot=texinfo&rev=1.1
Patches:
Index: Texinfo/Convert/Line.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Line.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- Texinfo/Convert/Line.pm 22 Jan 2011 17:12:31 -0000 1.12
+++ Texinfo/Convert/Line.pm 3 Feb 2011 23:38:01 -0000 1.13
@@ -86,6 +86,19 @@
return $line->{'end_line_count'};
}
+sub get_pending($)
+{
+ my $line = shift;
+ my $result = '';
+ if ($line->{'space'}) {
+ $result .= $line->{'space'};
+ }
+ if (defined($line->{'word'})) {
+ $result .= $line->{'word'};
+ }
+ return $result;
+}
+
sub add_pending_word($)
{
my $line = shift;
Index: Texinfo/Convert/Paragraph.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Paragraph.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- Texinfo/Convert/Paragraph.pm 22 Jan 2011 17:12:31 -0000 1.13
+++ Texinfo/Convert/Paragraph.pm 3 Feb 2011 23:38:02 -0000 1.14
@@ -92,6 +92,19 @@
return "\n";
}
+sub get_pending($)
+{
+ my $paragraph = shift;
+ my $result = '';
+ if ($paragraph->{'space'}) {
+ $result .= $paragraph->{'space'};
+ }
+ if (defined($paragraph->{'word'})) {
+ $result .= $paragraph->{'word'};
+ }
+ return $result;
+}
+
sub add_pending_word($)
{
my $paragraph = shift;
@@ -297,6 +310,12 @@
} else {
delete $paragraph->{'end_sentence'};
}
+ } else {
+ #Â FIXME
+ #Â this should never happen, all cases are taken into account above.
+ # however it happens with strange caracters that appear sometime and
+ #Â look like invalid. Is it a perl bug?
+ die "Unknown caracter leading $text";
}
}
return $result;
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -r1.62 -r1.63
--- Texinfo/Convert/Plaintext.pm 31 Jan 2011 00:37:22 -0000 1.62
+++ Texinfo/Convert/Plaintext.pm 3 Feb 2011 23:38:02 -0000 1.63
@@ -1311,7 +1311,6 @@
my @contents;
if ($command eq 'xref') {
$contents[0] = {'text' => '*Note '};
- # FIXME error message about no punctuation character following xref.
} else {
$contents[0] = {'text' => '*note '};
}
@@ -1343,7 +1342,31 @@
} else {
push @contents, (@{$args[0]}, {'text' => '::'});
}
- unshift @{$self->{'current_contents'}->[-1]}, @contents;
+ #unshift @{$self->{'current_contents'}->[-1]}, @contents;
+ $result = $self->_convert({'contents' => address@hidden);
+ #Â we could use $formatter, but in case it was changed in _convert
+ #Â we play it safe.
+ my $pending = $result
+ .$self->{'formatters'}->[-1]->{'container'}->get_pending();
+ if ($command ne 'pxref') {
+ if ($command eq 'xref' or ($pending !~ /[\.,]$/ and $pending !~
/::$/)) {
+ my $next = $self->{'current_contents'}->[-1]->[0];
+ if (!($next and $next->{'text'} and $next->{'text'} =~ /^[\.,]/)) {
+ if ($command eq 'xref') {
+ if ($next and defined($next->{'text'}) and $next->{'text'} =~
/\S/) {
+ my $text = $next->{'text'};
+ $text =~ s/^\s*//;
+ my $char = substr($text, 0, 1);
+ $self->line_warn(sprintf($self->__("`.' or `,' must follow
address@hidden, not %s"), $char), $root->{'line_nr'});
+ } else {
+ $self->line_warn($self->__("`.' or `,' must follow
address@hidden"), $root->{'line_nr'});
+ }
+ }
+ unshift @{$self->{'current_contents'}->[-1]}, {'text' => '.'};
+ }
+ }
+ }
+ return $result;
}
return '';
} elsif ($explained_commands{$command}) {
Index: Texinfo/Convert/UnFilled.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/UnFilled.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- Texinfo/Convert/UnFilled.pm 22 Jan 2011 17:12:31 -0000 1.6
+++ Texinfo/Convert/UnFilled.pm 3 Feb 2011 23:38:02 -0000 1.7
@@ -114,6 +114,11 @@
return $text;
}
+sub get_pending($)
+{
+ return '';
+}
+
# put a pending word and spaces in the result string.
sub add_pending_word($)
{
Index: t/02coverage.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/02coverage.t,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- t/02coverage.t 31 Jan 2011 00:37:22 -0000 1.33
+++ t/02coverage.t 3 Feb 2011 23:38:02 -0000 1.34
@@ -406,7 +406,7 @@
['verbatiminclude',
'
@verbatiminclude incl-incl.txi
-']
+'],
);
my @test_invalid = (
Index: t/03coverage_braces.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/03coverage_braces.t,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- t/03coverage_braces.t 7 Dec 2010 10:10:51 -0000 1.18
+++ t/03coverage_braces.t 3 Feb 2011 23:38:02 -0000 1.19
@@ -29,7 +29,7 @@
@url{--a,--b,--c}
'],
['nested', 'type the characters @kbd{l o g o u t @key{RET}}.'],
-['nested_args', '@xref{@@ @samp{in samp}, descr @b{in b}}'],
+['nested_args', '@xref{@@ @samp{in samp}, descr @b{in b}}.'],
['too_much_args', '@abbr{AZE, A truc Z b, E eep}'],
['footnote', 'address@hidden footnote.
Index: t/57invalid_nestings.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/57invalid_nestings.t,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- t/57invalid_nestings.t 31 Oct 2010 17:58:07 -0000 1.10
+++ t/57invalid_nestings.t 3 Feb 2011 23:38:02 -0000 1.11
@@ -276,8 +276,24 @@
'],
);
+my @formatted_cases = (
+['table_in_code',
+'@code{
+in code
address@hidden @emph
address@hidden line
+text
address@hidden table
+}
+'],
+);
+
+foreach my $test (@formatted_cases) {
+ $test->[2]->{'test_formats'} = ['plaintext'];
+}
+
our ($arg_test_case, $arg_generate, $arg_debug);
-run_all ('invalid_nestings', address@hidden, $arg_test_case,
+run_all ('invalid_nestings', address@hidden, @formatted_cases], $arg_test_case,
$arg_generate, $arg_debug);
Index: t/info_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/info_tests.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/info_tests.t 2 Feb 2011 23:50:21 -0000 1.2
+++ t/info_tests.t 3 Feb 2011 23:38:02 -0000 1.3
@@ -33,7 +33,35 @@
text.
@node chapter node
address@hidden chapter']);
address@hidden chapter'
+],
+#);
+
+#my @new_tests = (
+['ref_tests',
+'
address@hidden Top
+
address@hidden(m)in ref followed by comma},
address@hidden(m)in ref not followed by comma} after ref.
address@hidden@ref{(m)in ref followed by end command}}.
+
+
address@hidden(m)in ref followed by comma, name},
address@hidden(m)in ref not followed by comma, name} after ref.
address@hidden@ref{(m)in ref followed by end command, name}}.
address@hidden(m)in ref ending with a dot., name} after ref.
+
+'],
+['xref_test',
+'
address@hidden Top
+
address@hidden(m)in xref}. @xref{(m)bad xref} after xref.
address@hidden@xref{(m)bad nested xref}}.
address@hidden(m)in ref ending with a dot., name} ! after xref and dot inside.
address@hidden(m)in ref followed by symbol}# g.
+']);
foreach my $test (@test_cases) {
$test->[2]->{'test_formats'} = ['info'];
Index: t/test_utils.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/test_utils.pl,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- t/test_utils.pl 29 Jan 2011 23:57:21 -0000 1.67
+++ t/test_utils.pl 3 Feb 2011 23:38:02 -0000 1.68
@@ -354,7 +354,7 @@
}
if (defined($converted_errors{$format})) {
$out_result .= Data::Dumper->Dump([$converted_errors{$format}],
-
['$result_converted_errors\''.$format.'\'}->{\''.$test_name.'\'}']) ."\n\n";
+
['$result_converted_errors{\''.$format.'\'}->{\''.$test_name.'\'}']) ."\n\n";
#print STDERR "".Data::Dumper->Dump([$converted_errors{$format}]);
}
}
Index: t/results/coverage_braces/nested_args.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage_braces/nested_args.pl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- t/results/coverage_braces/nested_args.pl 7 Dec 2010 20:34:28 -0000
1.17
+++ t/results/coverage_braces/nested_args.pl 3 Feb 2011 23:38:02 -0000
1.18
@@ -92,6 +92,10 @@
'macro' => ''
},
'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '.'
}
],
'parent' => {},
@@ -117,18 +121,19 @@
$result_trees{'nested_args'}{'contents'}[0]{'contents'}[0]{'extra'}{'brace_command_contents'}[1][0]
=
$result_trees{'nested_args'}{'contents'}[0]{'contents'}[0]{'args'}[1]{'contents'}[1];
$result_trees{'nested_args'}{'contents'}[0]{'contents'}[0]{'extra'}{'brace_command_contents'}[1][1]
=
$result_trees{'nested_args'}{'contents'}[0]{'contents'}[0]{'args'}[1]{'contents'}[2];
$result_trees{'nested_args'}{'contents'}[0]{'contents'}[0]{'parent'} =
$result_trees{'nested_args'}{'contents'}[0];
+$result_trees{'nested_args'}{'contents'}[0]{'contents'}[1]{'parent'} =
$result_trees{'nested_args'}{'contents'}[0];
$result_trees{'nested_args'}{'contents'}[0]{'parent'} =
$result_trees{'nested_args'};
-$result_texis{'nested_args'} = '@xref{@@ @samp{in samp}, descr @b{in b}}';
+$result_texis{'nested_args'} = '@xref{@@ @samp{in samp}, descr @b{in b}}.';
-$result_texts{'nested_args'} = '';
+$result_texts{'nested_args'} = '.';
$result_errors{'nested_args'} = [];
-$result_converted{'plaintext'}->{'nested_args'} = '*Note descr in b: @ `in
samp\'
+$result_converted{'plaintext'}->{'nested_args'} = '*Note descr in b: @ `in
samp\'.
';
1;
Index: t/results/info_tests/ref_tests.pl
===================================================================
RCS file: t/results/info_tests/ref_tests.pl
diff -N t/results/info_tests/ref_tests.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/info_tests/ref_tests.pl 3 Feb 2011 23:38:02 -0000 1.1
@@ -0,0 +1,582 @@
+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_trees{'ref_tests'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'text_root'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'Top'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in ref followed by comma'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ',
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in ref not followed by comma'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 5,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ' after ref.
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in ref followed by end command'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'code',
+ 'contents' => [],
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '.
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in ref followed by comma'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => ' ',
+ 'type' => 'empty_spaces_before_argument'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'name'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ],
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 9,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ',
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in ref not followed by comma'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => ' ',
+ 'type' => 'empty_spaces_before_argument'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'name'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ],
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 10,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ' after ref.
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in ref followed by end command'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => ' ',
+ 'type' => 'empty_spaces_before_argument'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'name'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ],
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 11,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'code',
+ 'contents' => [],
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '.
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in ref ending with a dot.'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => ' ',
+ 'type' => 'empty_spaces_before_argument'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'name'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ],
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 12,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ' after ref.
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [],
+ 'normalized' => 'Top'
+ }
+ ],
+ 'normalized' => 'Top'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'type' => 'document_root'
+};
+$result_trees{'ref_tests'}{'contents'}[0]{'contents'}[0]{'parent'} =
$result_trees{'ref_tests'}{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[0]{'parent'} =
$result_trees{'ref_tests'};
+$result_trees{'ref_tests'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'args'}[0]{'parent'} =
$result_trees{'ref_tests'}{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[0]{'parent'} =
$result_trees{'ref_tests'}{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'args'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[2];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[3]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'contents'}[5]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[1]{'parent'} =
$result_trees{'ref_tests'}{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[2]{'parent'} =
$result_trees{'ref_tests'}{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[3]{'parent'} =
$result_trees{'ref_tests'}{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'args'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'args'}[1]{'contents'}[1]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'args'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'args'}[1]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'extra'}{'brace_command_contents'}[1][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'args'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[1]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'args'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'args'}[1]{'contents'}[1]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'args'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'args'}[1]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'extra'}{'brace_command_contents'}[1][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'args'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[2]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[3]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[1]{'contents'}[1]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[1]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'extra'}{'brace_command_contents'}[1][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'args'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[4]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[5]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'args'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'args'}[0]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'args'}[1]{'contents'}[1]{'parent'}
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'args'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'args'}[1]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'args'}[0]{'contents'}[0];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'extra'}{'brace_command_contents'}[1][0]
=
$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'args'}[1]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[6]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'contents'}[7]{'parent'}
= $result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[4]{'parent'} =
$result_trees{'ref_tests'}{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'contents'}[5]{'parent'} =
$result_trees{'ref_tests'}{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'extra'}{'node_content'}[0] =
$result_trees{'ref_tests'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'ref_tests'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
= $result_trees{'ref_tests'}{'contents'}[1]{'extra'}{'node_content'};
+$result_trees{'ref_tests'}{'contents'}[1]{'parent'} =
$result_trees{'ref_tests'};
+
+$result_texis{'ref_tests'} = '
address@hidden Top
+
address@hidden(m)in ref followed by comma},
address@hidden(m)in ref not followed by comma} after ref.
address@hidden@ref{(m)in ref followed by end command}}.
+
+
address@hidden(m)in ref followed by comma, name},
address@hidden(m)in ref not followed by comma, name} after ref.
address@hidden@ref{(m)in ref followed by end command, name}}.
address@hidden(m)in ref ending with a dot., name} after ref.
+
+';
+
+
+$result_texts{'ref_tests'} = '
+
+,
+ after ref.
+.
+
+
+,
+ after ref.
+.
+ after ref.
+
+';
+
+$result_sectioning{'ref_tests'} = {};
+
+$result_nodes{'ref_tests'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ },
+ 'node_up' => {
+ 'extra' => {
+ 'manual_content' => [
+ {
+ 'text' => 'dir'
+ }
+ ]
+ }
+ }
+};
+
+$result_menus{'ref_tests'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+};
+
+$result_errors{'ref_tests'} = [];
+
+
+
+$result_converted{'info'}->{'ref_tests'} = 'This is , produced by makeinfo
version 4.13 from .
+
+
+File: , Node: Top, Up: (dir)
+
+*note (m)in ref followed by comma::, *note (m)in ref not followed by
+comma:: after ref. `*note (m)in ref followed by end command::\'.
+
+ *note name: (m)in ref followed by comma, *note name: (m)in ref not
+followed by comma. after ref. `*note name: (m)in ref followed by end
+command.\'. *note name: (m)in ref ending with a dot. after ref.
+
+
+
+Tag Table:
+Node: Top52
+
+End Tag Table
+';
+
+1;
Index: t/results/info_tests/xref_test.pl
===================================================================
RCS file: t/results/info_tests/xref_test.pl
diff -N t/results/info_tests/xref_test.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/info_tests/xref_test.pl 3 Feb 2011 23:38:02 -0000 1.1
@@ -0,0 +1,421 @@
+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_trees{'xref_test'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'text_root'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'Top'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in xref'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'xref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '. '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)bad xref'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'xref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {},
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ' after xref.
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)bad nested xref'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'xref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 5,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'code',
+ 'contents' => [],
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '.
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in ref ending with a dot.'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => ' ',
+ 'type' => 'empty_spaces_before_argument'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'name'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'xref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ],
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ' ! after xref and dot inside.
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '(m)in ref followed by symbol'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'xref',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 7,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '# g.
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [],
+ 'normalized' => 'Top'
+ }
+ ],
+ 'normalized' => 'Top'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'type' => 'document_root'
+};
+$result_trees{'xref_test'}{'contents'}[0]{'contents'}[0]{'parent'} =
$result_trees{'xref_test'}{'contents'}[0];
+$result_trees{'xref_test'}{'contents'}[0]{'parent'} =
$result_trees{'xref_test'};
+$result_trees{'xref_test'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'args'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'args'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'args'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'args'}[0]{'parent'} =
$result_trees{'xref_test'}{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[0]{'parent'} =
$result_trees{'xref_test'}{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'args'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'args'}[0]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[2];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'args'}[0]{'contents'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'line_nr'}
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'line_nr'};
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[3]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'parent'}
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'args'}[0]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[4]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[5]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'args'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'args'}[0]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'args'}[1]{'contents'}[1]{'parent'}
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'args'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'args'}[1]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'args'}[0]{'contents'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'extra'}{'brace_command_contents'}[1][0]
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'args'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[6]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[7]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[8]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[8]{'args'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[8]{'args'}[0]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[8];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[8]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[8]{'args'}[0]{'contents'}[0];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[8]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'contents'}[9]{'parent'}
= $result_trees{'xref_test'}{'contents'}[1]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'contents'}[1]{'parent'} =
$result_trees{'xref_test'}{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'extra'}{'node_content'}[0] =
$result_trees{'xref_test'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'xref_test'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
= $result_trees{'xref_test'}{'contents'}[1]{'extra'}{'node_content'};
+$result_trees{'xref_test'}{'contents'}[1]{'parent'} =
$result_trees{'xref_test'};
+
+$result_texis{'xref_test'} = '
address@hidden Top
+
address@hidden(m)in xref}. @xref{(m)bad xref} after xref.
address@hidden@xref{(m)bad nested xref}}.
address@hidden(m)in ref ending with a dot., name} ! after xref and dot inside.
address@hidden(m)in ref followed by symbol}# g.
+';
+
+
+$result_texts{'xref_test'} = '
+
+. after xref.
+.
+ ! after xref and dot inside.
+# g.
+';
+
+$result_sectioning{'xref_test'} = {};
+
+$result_nodes{'xref_test'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ },
+ 'node_up' => {
+ 'extra' => {
+ 'manual_content' => [
+ {
+ 'text' => 'dir'
+ }
+ ]
+ }
+ }
+};
+
+$result_menus{'xref_test'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+};
+
+$result_errors{'xref_test'} = [];
+
+
+
+$result_converted{'info'}->{'xref_test'} = 'This is , produced by makeinfo
version 4.13 from .
+
+
+File: , Node: Top, Up: (dir)
+
+*Note (m)in xref::. *Note (m)bad xref::. after xref. `*Note (m)bad
+nested xref::.\'. *Note name: (m)in ref ending with a dot.. ! after
+xref and dot inside. *Note (m)in ref followed by symbol::.# g.
+
+
+Tag Table:
+Node: Top52
+
+End Tag Table
+';
+
+$result_converted_errors{'info'}->{'xref_test'} = [
+ {
+ 'file_name' => '',
+ 'error_line' => ':4: warning: `.\' or `,\' must follow @xref, not a
+',
+ 'text' => '`.\' or `,\' must follow @xref, not a',
+ 'type' => 'warning',
+ 'macro' => '',
+ 'line_nr' => 4
+ },
+ {
+ 'file_name' => '',
+ 'error_line' => ':5: warning: `.\' or `,\' must follow @xref
+',
+ 'text' => '`.\' or `,\' must follow @xref',
+ 'type' => 'warning',
+ 'macro' => '',
+ 'line_nr' => 5
+ },
+ {
+ 'file_name' => '',
+ 'error_line' => ':6: warning: `.\' or `,\' must follow @xref, not !
+',
+ 'text' => '`.\' or `,\' must follow @xref, not !',
+ 'type' => 'warning',
+ 'macro' => '',
+ 'line_nr' => 6
+ },
+ {
+ 'file_name' => '',
+ 'error_line' => ':7: warning: `.\' or `,\' must follow @xref, not #
+',
+ 'text' => '`.\' or `,\' must follow @xref, not #',
+ 'type' => 'warning',
+ 'macro' => '',
+ 'line_nr' => 7
+ }
+];
+
+
+1;
Index: t/results/invalid_nestings/table_in_code.pl
===================================================================
RCS file: t/results/invalid_nestings/table_in_code.pl
diff -N t/results/invalid_nestings/table_in_code.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/invalid_nestings/table_in_code.pl 3 Feb 2011 23:38:02 -0000
1.1
@@ -0,0 +1,212 @@
+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_trees{'table_in_code'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'in code
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'code',
+ 'contents' => [],
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'cmdname' => 'emph',
+ 'parent' => {},
+ 'type' => 'command_as_argument'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'space_at_end_block_command'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'block_line_arg'
+ }
+ ],
+ 'cmdname' => 'table',
+ 'contents' => [
+ {
+ 'contents' => [],
+ 'parent' => {},
+ 'type' => 'before_item'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'line'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'item',
+ 'extra' => {
+ 'misc_content' => [
+ {}
+ ]
+ },
+ 'parent' => {}
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'text
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'extra' => {
+ 'block_command_line_contents' => [
+ [
+ {}
+ ]
+ ],
+ 'command_as_argument' => 'emph',
+ 'invalid_nesting' => 1
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+'
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'table_in_code'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'table_in_code'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'table_in_code'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[0]{'contents'}[0];
+$result_trees{'table_in_code'}{'contents'}[0]{'contents'}[0]{'parent'} =
$result_trees{'table_in_code'}{'contents'}[0];
+$result_trees{'table_in_code'}{'contents'}[0]{'parent'} =
$result_trees{'table_in_code'};
+$result_trees{'table_in_code'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[1]{'args'}[0];
+$result_trees{'table_in_code'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[1]{'args'}[0];
+$result_trees{'table_in_code'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[1]{'args'}[0];
+$result_trees{'table_in_code'}{'contents'}[1]{'args'}[0]{'parent'} =
$result_trees{'table_in_code'}{'contents'}[1];
+$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[0]{'parent'} =
$result_trees{'table_in_code'}{'contents'}[1];
+$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'args'}[0];
+$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'args'}[0];
+$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'args'}[0];
+$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'args'}[0]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1];
+$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'extra'}{'misc_content'}[0]
=
$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[1]{'parent'} =
$result_trees{'table_in_code'}{'contents'}[1];
+$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[2]{'contents'}[0]{'parent'}
= $result_trees{'table_in_code'}{'contents'}[1]{'contents'}[2];
+$result_trees{'table_in_code'}{'contents'}[1]{'contents'}[2]{'parent'} =
$result_trees{'table_in_code'}{'contents'}[1];
+$result_trees{'table_in_code'}{'contents'}[1]{'extra'}{'block_command_line_contents'}[0][0]
= $result_trees{'table_in_code'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'table_in_code'}{'contents'}[1]{'parent'} =
$result_trees{'table_in_code'};
+$result_trees{'table_in_code'}{'contents'}[2]{'parent'} =
$result_trees{'table_in_code'};
+$result_trees{'table_in_code'}{'contents'}[3]{'parent'} =
$result_trees{'table_in_code'};
+
+$result_texis{'table_in_code'} = '@code{
+in code
address@hidden @emph
address@hidden line
+text
address@hidden table
+
+';
+
+
+$result_texts{'table_in_code'} = '
+in code
+line
+text
+
+';
+
+$result_errors{'table_in_code'} = [
+ {
+ 'error_line' => ':3: warning: @table should not appear in @code
+',
+ 'file_name' => '',
+ 'line_nr' => 3,
+ 'macro' => '',
+ 'text' => '@table should not appear in @code',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':3: @code missing close brace
+',
+ 'file_name' => '',
+ 'line_nr' => 3,
+ 'macro' => '',
+ 'text' => '@code missing close brace',
+ 'type' => 'error'
+ },
+ {
+ 'error_line' => ':7: Misplaced }
+',
+ 'file_name' => '',
+ 'line_nr' => 7,
+ 'macro' => '',
+ 'text' => 'Misplaced }',
+ 'type' => 'error'
+ }
+];
+
+
+
+$result_converted{'plaintext'}->{'table_in_code'} = '` in code \'
+';
+
+1;
- texinfo/tp Texinfo/Convert/Line.pm Texinfo/Conv...,
Patrice Dumas <=