[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Parser.pm t/08misc_comm...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Parser.pm t/08misc_comm... |
Date: |
Sun, 31 Oct 2010 16:42:34 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 10/10/31 16:42:34
Modified files:
tp : TODO
tp/Texinfo : Parser.pm
tp/t : 08misc_commands.t 30sectioning.t
Added files:
tp/t/results/misc_commands: text_before_line_command.pl
tp/t/results/sectioning: empty_nodes_with_commands.pl
Log message:
Handle better nodes containing only space commands.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.131&r2=1.132
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/08misc_commands.t?cvsroot=texinfo&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/30sectioning.t?cvsroot=texinfo&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/misc_commands/text_before_line_command.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/empty_nodes_with_commands.pl?cvsroot=texinfo&rev=1.1
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- TODO 31 Oct 2010 15:55:10 -0000 1.50
+++ TODO 31 Oct 2010 16:42:33 -0000 1.51
@@ -97,6 +97,8 @@
sectioning/node-whitespace.tex (but not @ref)
sectioning/loop_nodes.texi
sectioning/sectioning.texi
+sectioning/text_before_line_command.texi
+sectioning/empty_nodes.texi (but not the @ref)
indices/unknown_index_entry.texi
indices/more_unknown_index_entry.texi (but without the document structure)
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -b -r1.131 -r1.132
--- Texinfo/Parser.pm 31 Oct 2010 14:28:16 -0000 1.131
+++ Texinfo/Parser.pm 31 Oct 2010 16:42:33 -0000 1.132
@@ -1610,7 +1610,7 @@
_trim_spaces_comment_from_content(address@hidden);
if (@type_contents) {
my $normalized =
Texinfo::Convert::NodeNameNormalization::convert({'contents' => address@hidden);
- if ($normalized =~ /\S/) {
+ if ($normalized =~ /[^-]/) {
$current->{'extra'}->{'type'}->{'normalized'} = $normalized;
$current->{'extra'}->{'type'}->{'content'} = address@hidden;
return 1;
@@ -1932,7 +1932,7 @@
_check_internal_node($self, $float_label, $float->{'args'}->[1],
$line_nr);
if (defined($float_label) and $float_label->{'node_content'}
- and $float_label->{'normalized'} =~ /\S/) {
+ and $float_label->{'normalized'} =~ /[^-]/) {
_register_label($self, $float, $float_label, $line_nr);
}
}
@@ -2171,11 +2171,15 @@
my $parsed_node = shift;
my $command = shift;
my $line_nr = shift;
- if (!defined($parsed_node) or !$parsed_node->{'node_content'}
- or $parsed_node->{'normalized'} !~ /\S/) {
+ if (!defined($parsed_node) or !$parsed_node->{'node_content'}) {
_line_error ($self, sprintf($self->__("Empty argument in address@hidden"),
$command), $line_nr);
return 0;
+ } elsif ($parsed_node->{'normalized'} !~ /[^-]/) {
+ _line_error ($self, sprintf($self->__("Empty node name after expansion
`%s'"),
+ tree_to_texi({'contents' => $parsed_node->{'node_content'}})),
+ $line_nr);
+ return 0;
} else {
return 1;
}
Index: t/08misc_commands.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/08misc_commands.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- t/08misc_commands.t 24 Oct 2010 14:22:58 -0000 1.5
+++ t/08misc_commands.t 31 Oct 2010 16:42:33 -0000 1.6
@@ -155,7 +155,21 @@
'],
['empty_documentencoding',
'@documentencoding
+'],
+['text_before_line_command',
+'before title @title the title
+
address@hidden LD Version Scripts
+--- @chapter LD Version Scripts
+
+ddd @contents
+
address@hidden
+aaa @author quotation author
+quotation
address@hidden quotation
']
+
);
our ($arg_test_case, $arg_generate, $arg_debug);
Index: t/30sectioning.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/30sectioning.t,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- t/30sectioning.t 31 Oct 2010 15:55:10 -0000 1.14
+++ t/30sectioning.t 31 Oct 2010 16:42:33 -0000 1.15
@@ -28,6 +28,14 @@
@node Test title
'],
+['empty_nodes_with_commands',
+'
address@hidden @c comment
+
address@hidden @
address@hidden @:
address@hidden @asis{ }
+'],
['sections',
'@chapter a chapter
'],
Index: t/results/misc_commands/text_before_line_command.pl
===================================================================
RCS file: t/results/misc_commands/text_before_line_command.pl
diff -N t/results/misc_commands/text_before_line_command.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/misc_commands/text_before_line_command.pl 31 Oct 2010 16:42:33
-0000 1.1
@@ -0,0 +1,425 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+%results_indices %result_sectioning %result_nodes);
+
+$result_trees{'text_before_line_command'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'before title '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'the title'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'title',
+ 'extra' => {
+ 'misc_content' => [
+ {}
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'i'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'text_root'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'LD Version Scripts'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '--- '
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [],
+ 'normalized' => 'LD-Version-Scripts'
+ }
+ ],
+ 'normalized' => 'LD-Version-Scripts'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 3,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'LD Version Scripts'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'ddd '
+ },
+ {
+ 'cmdname' => 'contents',
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'cmdname' => 'quotation',
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line_after_command'
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'aaa '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'quotation author'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'author',
+ 'extra' => {
+ 'misc_content' => [
+ {}
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 9,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => 'quotation
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line_after_command'
+ }
+ ],
+ 'extra' => {
+ 'misc_content' => [
+ {}
+ ]
+ },
+ 'level' => 1,
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => ''
+ },
+ 'number' => 1,
+ 'parent' => {}
+ }
+ ],
+ 'type' => 'document_root'
+};
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'misc_content'}[0]
=
$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[1]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[2]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[2];
+$result_trees{'text_before_line_command'}{'contents'}[0]{'contents'}[2]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[1]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[1]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[1]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[1]{'args'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[1]{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[1]{'contents'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[1]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[1]{'extra'}{'node_content'}[0]
=
$result_trees{'text_before_line_command'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
=
$result_trees{'text_before_line_command'}{'contents'}[1]{'extra'}{'node_content'};
+$result_trees{'text_before_line_command'}{'contents'}[1]{'parent'} =
$result_trees{'text_before_line_command'};
+$result_trees{'text_before_line_command'}{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'args'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[1]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[1]{'contents'}[1]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[1]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[2]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[0]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'args'}[0];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'args'}[0]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'extra'}{'misc_content'}[0]
=
$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'contents'}[2]{'parent'}
=
$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'contents'}[1]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[3]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'contents'}[4]{'parent'}
= $result_trees{'text_before_line_command'}{'contents'}[2];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'extra'}{'misc_content'}[0]
=
$result_trees{'text_before_line_command'}{'contents'}[2]{'args'}[0]{'contents'}[1];
+$result_trees{'text_before_line_command'}{'contents'}[2]{'parent'} =
$result_trees{'text_before_line_command'};
+
+$result_texis{'text_before_line_command'} = 'before title @title the title
+
address@hidden LD Version Scripts
+--- @chapter LD Version Scripts
+
+ddd @contents
+
address@hidden
+aaa @author quotation author
+quotation
address@hidden quotation
+';
+
+
+$result_texts{'text_before_line_command'} = 'before title
+i--- LD Version Scripts
+
+ddd
+aaa quotation
+';
+
+$result_sectioning{'text_before_line_command'} = {
+ 'level' => 0,
+ 'section_childs' => [
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'LD-Version-Scripts'
+ }
+ }
+ },
+ 'level' => 1,
+ 'number' => 1,
+ 'section_up' => {}
+ }
+ ]
+};
+$result_sectioning{'text_before_line_command'}{'section_childs'}[0]{'section_up'}
= $result_sectioning{'text_before_line_command'};
+
+$result_nodes{'text_before_line_command'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {},
+ 'level' => 1,
+ 'number' => 1
+ },
+ 'normalized' => 'LD-Version-Scripts'
+ }
+};
+
+$result_menus{'text_before_line_command'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'LD-Version-Scripts'
+ }
+};
+
+$result_errors{'text_before_line_command'} = [
+ {
+ 'error_line' => ':1: warning: @title should only appear at a line beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => '@title should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':3: warning: @node should only appear at a line beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 3,
+ 'macro' => '',
+ 'text' => '@node should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':4: warning: @chapter should only appear at a line
beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => '',
+ 'text' => '@chapter should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':6: warning: @contents should only appear at a line
beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => '',
+ 'text' => '@contents should only appear at a line beginning',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => ':9: warning: @author should only appear at a line
beginning
+',
+ 'file_name' => '',
+ 'line_nr' => 9,
+ 'macro' => '',
+ 'text' => '@author should only appear at a line beginning',
+ 'type' => 'warning'
+ }
+];
+
+
+1;
Index: t/results/sectioning/empty_nodes_with_commands.pl
===================================================================
RCS file: t/results/sectioning/empty_nodes_with_commands.pl
diff -N t/results/sectioning/empty_nodes_with_commands.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/sectioning/empty_nodes_with_commands.pl 31 Oct 2010 16:42:34
-0000 1.1
@@ -0,0 +1,288 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+%results_indices %result_sectioning %result_nodes);
+
+$result_trees{'empty_nodes_with_commands'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'type' => 'text_root'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'args' => [
+ {
+ 'parent' => {},
+ 'text' => ' comment
+',
+ 'type' => 'misc_arg'
+ }
+ ],
+ 'cmdname' => 'c',
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {
+ 'nodes_manuals' => [
+ undef
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'cmdname' => '
+',
+ 'parent' => {}
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [],
+ 'extra' => {
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => '-'
+ }
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'cmdname' => ':',
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [],
+ 'extra' => {
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => ''
+ }
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 5,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => ' '
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'asis',
+ 'contents' => [],
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [],
+ 'extra' => {
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => '-'
+ }
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'type' => 'document_root'
+};
+$result_trees{'empty_nodes_with_commands'}{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[1]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'args'}[0]{'parent'}
=
$result_trees{'empty_nodes_with_commands'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[1]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[1]{'args'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[1];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[1]{'contents'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[1];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[1]{'parent'} =
$result_trees{'empty_nodes_with_commands'};
+$result_trees{'empty_nodes_with_commands'}{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[2]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[2]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[2]{'args'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[2];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[2]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
=
$result_trees{'empty_nodes_with_commands'}{'contents'}[2]{'args'}[0]{'contents'}[1];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[2]{'parent'} =
$result_trees{'empty_nodes_with_commands'};
+$result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'args'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[3];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
=
$result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'args'}[0]{'contents'}[1];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[3]{'parent'} =
$result_trees{'empty_nodes_with_commands'};
+$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0]{'contents'}[1]{'args'}[0]{'parent'}
=
$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0]{'contents'}[1];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0]{'parent'}
= $result_trees{'empty_nodes_with_commands'}{'contents'}[4];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
=
$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'args'}[0]{'contents'}[1];
+$result_trees{'empty_nodes_with_commands'}{'contents'}[4]{'parent'} =
$result_trees{'empty_nodes_with_commands'};
+
+$result_texis{'empty_nodes_with_commands'} = '
address@hidden @c comment
+
address@hidden @
address@hidden @:
address@hidden @asis{ }
+';
+
+
+$result_texts{'empty_nodes_with_commands'} = '
+
+';
+
+$result_sectioning{'empty_nodes_with_commands'} = {};
+
+$result_errors{'empty_nodes_with_commands'} = [
+ {
+ 'error_line' => ':2: Empty argument in @node
+',
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => '',
+ 'text' => 'Empty argument in @node',
+ 'type' => 'error'
+ },
+ {
+ 'error_line' => ':4: Empty node name after expansion `@
+\'
+',
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => '',
+ 'text' => 'Empty node name after expansion `@
+\'',
+ 'type' => 'error'
+ },
+ {
+ 'error_line' => ':5: Empty node name after expansion `@:\'
+',
+ 'file_name' => '',
+ 'line_nr' => 5,
+ 'macro' => '',
+ 'text' => 'Empty node name after expansion `@:\'',
+ 'type' => 'error'
+ },
+ {
+ 'error_line' => ':6: Empty node name after expansion address@hidden }\'
+',
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => '',
+ 'text' => 'Empty node name after expansion address@hidden }\'',
+ 'type' => 'error'
+ }
+];
+
+
+1;