[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Convert/XML.pm t/xml_te...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Convert/XML.pm t/xml_te... |
Date: |
Sun, 09 Sep 2012 09:46:24 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 12/09/09 09:46:24
Modified files:
tp : TODO
tp/Texinfo/Convert: XML.pm
tp/t : xml_tests.t
Added files:
tp/t/results/xml_tests: lone_bye.pl node_and_bye.pl
Log message:
Output <bye> in XML when there is no sections.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.298&r2=1.299
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/XML.pm?cvsroot=texinfo&r1=1.81&r2=1.82
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/xml_tests.t?cvsroot=texinfo&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/xml_tests/lone_bye.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/xml_tests/node_and_bye.pl?cvsroot=texinfo&rev=1.1
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.298
retrieving revision 1.299
diff -u -b -r1.298 -r1.299
--- TODO 8 Sep 2012 23:06:28 -0000 1.298
+++ TODO 9 Sep 2012 09:46:23 -0000 1.299
@@ -9,9 +9,6 @@
Bugs
====
-In texi file generated from xml_tests.t node_no_section, translation
-to XML, @bye lost.
-
Delayed bugs
============
Index: Texinfo/Convert/XML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/XML.pm,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- Texinfo/Convert/XML.pm 8 Sep 2012 21:56:22 -0000 1.81
+++ Texinfo/Convert/XML.pm 9 Sep 2012 09:46:23 -0000 1.82
@@ -517,7 +517,7 @@
my $root = shift;
if (0) {
- #if (1) {
+ #if (1) { #}
print STDERR "root\n";
print STDERR " Command: $root->{'cmdname'}\n" if ($root->{'cmdname'});
print STDERR " Type: $root->{'type'}\n" if ($root->{'type'});
@@ -793,7 +793,10 @@
# the comand closing. So we delay the output of @bye, and store it.
if ($root->{'cmdname'} eq 'bye' and $root->{'parent'}
and $root->{'parent'}->{'type'}
- and $root->{'parent'}->{'type'} eq 'element') {
+ and $root->{'parent'}->{'type'} eq 'element'
+ and !($root->{'parent'}->{'extra'}
+ and $root->{'parent'}->{'extra'}->{'no_section'})) {
+ #print STDERR "$root->{'parent'} $root->{'parent'}->{'type'}\n";
$self->{'pending_bye'} = "<$command></$command>\n";
return '';
}
Index: t/xml_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/xml_tests.t,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- t/xml_tests.t 8 Sep 2012 21:56:22 -0000 1.14
+++ t/xml_tests.t 9 Sep 2012 09:46:23 -0000 1.15
@@ -301,6 +301,14 @@
@image{a,
b}
'],
+['node_and_bye',
+'@node Top
+
address@hidden
+', {'test_split' => 'section'}],
+['lone_bye',
+'@bye
+'],
);
foreach my $test (@test_cases) {
Index: t/results/xml_tests/lone_bye.pl
===================================================================
RCS file: t/results/xml_tests/lone_bye.pl
diff -N t/results/xml_tests/lone_bye.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/xml_tests/lone_bye.pl 9 Sep 2012 09:46:24 -0000 1.1
@@ -0,0 +1,41 @@
+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_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'lone_bye'} = {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'misc_arg'
+ }
+ ],
+ 'cmdname' => 'bye',
+ 'parent' => {}
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'lone_bye'}{'contents'}[0]{'args'}[0]{'parent'} =
$result_trees{'lone_bye'}{'contents'}[0];
+$result_trees{'lone_bye'}{'contents'}[0]{'parent'} = $result_trees{'lone_bye'};
+
+$result_texis{'lone_bye'} = '@bye
+';
+
+
+$result_texts{'lone_bye'} = '';
+
+$result_errors{'lone_bye'} = [];
+
+
+
+$result_converted{'xml'}->{'lone_bye'} = '<bye></bye>
+';
+
+1;
Index: t/results/xml_tests/node_and_bye.pl
===================================================================
RCS file: t/results/xml_tests/node_and_bye.pl
diff -N t/results/xml_tests/node_and_bye.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/xml_tests/node_and_bye.pl 9 Sep 2012 09:46:24 -0000 1.1
@@ -0,0 +1,170 @@
+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_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'node_and_bye'} = [
+ {
+ 'contents' => [
+ {
+ 'contents' => [],
+ 'parent' => {},
+ 'type' => 'text_root'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'extra' => {
+ 'command' => {}
+ },
+ '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'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [],
+ 'normalized' => 'Top'
+ }
+ ],
+ 'normalized' => 'Top',
+ 'spaces_after_command' => {}
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'args' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'misc_arg'
+ }
+ ],
+ 'cmdname' => 'bye',
+ 'parent' => {}
+ }
+ ],
+ 'extra' => {
+ 'no_section' => 1
+ },
+ 'type' => 'element'
+ }
+];
+$result_trees{'node_and_bye'}[0]{'contents'}[0]{'parent'} =
$result_trees{'node_and_bye'}[0];
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
= $result_trees{'node_and_bye'}[0]{'contents'}[1];
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0]{'parent'} =
$result_trees{'node_and_bye'}[0]{'contents'}[1];
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'contents'}[0]{'parent'} =
$result_trees{'node_and_bye'}[0]{'contents'}[1];
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'extra'}{'node_content'}[0] =
$result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
= $result_trees{'node_and_bye'}[0]{'contents'}[1]{'extra'}{'node_content'};
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'extra'}{'spaces_after_command'}
= $result_trees{'node_and_bye'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'node_and_bye'}[0]{'contents'}[1]{'parent'} =
$result_trees{'node_and_bye'}[0];
+$result_trees{'node_and_bye'}[0]{'contents'}[2]{'args'}[0]{'parent'} =
$result_trees{'node_and_bye'}[0]{'contents'}[2];
+$result_trees{'node_and_bye'}[0]{'contents'}[2]{'parent'} =
$result_trees{'node_and_bye'}[0];
+
+$result_texis{'node_and_bye'} = '@node Top
+
address@hidden
+';
+
+
+$result_texts{'node_and_bye'} = '
+';
+
+$result_sectioning{'node_and_bye'} = {};
+
+$result_nodes{'node_and_bye'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ },
+ 'node_up' => {
+ 'extra' => {
+ 'manual_content' => [
+ {
+ 'text' => 'dir'
+ }
+ ],
+ 'top_node_up' => {}
+ },
+ 'type' => 'top_node_up'
+ }
+};
+$result_nodes{'node_and_bye'}{'node_up'}{'extra'}{'top_node_up'} =
$result_nodes{'node_and_bye'};
+
+$result_menus{'node_and_bye'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+};
+
+$result_errors{'node_and_bye'} = [];
+
+
+$result_elements{'node_and_bye'} = [
+ {
+ 'extra' => {
+ 'directions' => {
+ 'This' => {}
+ },
+ 'no_section' => 1
+ },
+ 'type' => 'element'
+ }
+];
+$result_elements{'node_and_bye'}[0]{'extra'}{'directions'}{'This'} =
$result_elements{'node_and_bye'}[0];
+
+
+
+$result_directions_text{'node_and_bye'} = 'element: No associated command
(type element)
+ This: No associated command (type element)
+';
+
+
+$result_converted{'xml'}->{'node_and_bye'} = '<node name="Top" spaces="
"><nodename>Top</nodename><nodeup automatic="on">(dir)</nodeup></node>
+
+<bye></bye>
+';
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp TODO Texinfo/Convert/XML.pm t/xml_te...,
Patrice Dumas <=