[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: |
Wed, 28 Sep 2011 21:44:21 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/09/28 21:44:21
Modified files:
tp : TODO
tp/Texinfo : Parser.pm
tp/t : 08misc_commands.t
Added files:
tp/t/results/misc_commands: definfoenclose_with_empty_arg.pl
Log message:
Handle @definfoenclose with an empty argument.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.177&r2=1.178
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.306&r2=1.307
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/08misc_commands.t?cvsroot=texinfo&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/misc_commands/definfoenclose_with_empty_arg.pl?cvsroot=texinfo&rev=1.1
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -b -r1.177 -r1.178
--- TODO 28 Sep 2011 19:02:49 -0000 1.177
+++ TODO 28 Sep 2011 21:44:21 -0000 1.178
@@ -2,12 +2,6 @@
perl -w t/02coverage.t -o
xmllint --nonet --noout --valid commands.xml
-Test
address@hidden headword, , :
- to define address@hidden' as an Info
- formatting command that inserts nothing before and a colon after the
- argument to address@hidden'.
-
In xml output, as can be seen in xtable/table_nested macro output do
not begin with an end of line
<macro>@vtable @asis
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -b -r1.306 -r1.307
--- Texinfo/Parser.pm 28 Sep 2011 21:26:46 -0000 1.306
+++ Texinfo/Parser.pm 28 Sep 2011 21:44:21 -0000 1.307
@@ -4650,7 +4650,7 @@
} elsif ($command eq 'definfoenclose') {
# REMACRO
- if ($line =~
s/^([[:alnum:]][[:alnum:]\-]*)\s*,\s*([^\s,]+)\s*,\s*([^\s,]+)$//) {
+ if ($line =~
s/^([[:alnum:]][[:alnum:]\-]*)\s*,\s*([^\s,]*)\s*,\s*([^\s,]*)$//) {
$args = [$1, $2, $3 ];
$self->{'definfoenclose'}->{$1} = [ $2, $3 ];
print STDERR "DEFINFOENCLOSE address@hidden: $2, $3\n" if
($self->{'DEBUG'});
Index: t/08misc_commands.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/08misc_commands.t,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- t/08misc_commands.t 10 Sep 2011 12:27:18 -0000 1.24
+++ t/08misc_commands.t 28 Sep 2011 21:44:21 -0000 1.25
@@ -247,6 +247,13 @@
@strong{ is it really strong? }
'],
+['definfoenclose_with_empty_arg',
+'
address@hidden headword, , :
+
+My @headword{something}.
+
+'],
['no_empty_line_between_headings',
'@top Top
@subheading Subheading
@@ -438,12 +445,18 @@
'comment_space_command_on_line' => 1,
);
+my %xml_tests = (
+ 'definfoenclose_with_empty_arg' => 1,
+);
+
foreach my $test (@converted_test_cases) {
push @{$test->[2]->{'test_formats'}}, 'plaintext';
push @{$test->[2]->{'test_formats'}}, 'html_text';
if ($info_tests{$test->[0]}) {
push @{$test->[2]->{'test_formats'}}, 'info';
push @{$test->[2]->{'test_formats'}}, 'xml';
+ } elsif ($xml_tests{$test->[0]}) {
+ push @{$test->[2]->{'test_formats'}}, 'xml';
}
}
Index: t/results/misc_commands/definfoenclose_with_empty_arg.pl
===================================================================
RCS file: t/results/misc_commands/definfoenclose_with_empty_arg.pl
diff -N t/results/misc_commands/definfoenclose_with_empty_arg.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/misc_commands/definfoenclose_with_empty_arg.pl 28 Sep 2011
21:44:21 -0000 1.1
@@ -0,0 +1,161 @@
+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{'definfoenclose_with_empty_arg'} = {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'extra' => {
+ 'command' => {}
+ },
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'headword, , :'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'definfoenclose',
+ 'extra' => {
+ 'misc_args' => [
+ 'headword',
+ '',
+ ':'
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'My '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'something'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'headword',
+ 'contents' => [],
+ 'extra' => {
+ 'begin' => '',
+ 'end' => ':'
+ },
+ 'parent' => {},
+ 'type' => 'definfoenclose_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => '.
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[0]{'parent'} =
$result_trees{'definfoenclose_with_empty_arg'};
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
= $result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1]{'args'}[0];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1]{'args'}[0];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1]{'args'}[0];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1]{'args'}[0]{'parent'}
= $result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[1]{'parent'} =
$result_trees{'definfoenclose_with_empty_arg'};
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[2]{'parent'} =
$result_trees{'definfoenclose_with_empty_arg'};
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3]{'contents'}[0]{'parent'}
= $result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3]{'contents'}[1]{'args'}[0]{'parent'}
= $result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3]{'contents'}[1];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3]{'contents'}[1]{'parent'}
= $result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3]{'contents'}[2]{'parent'}
= $result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3];
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[3]{'parent'} =
$result_trees{'definfoenclose_with_empty_arg'};
+$result_trees{'definfoenclose_with_empty_arg'}{'contents'}[4]{'parent'} =
$result_trees{'definfoenclose_with_empty_arg'};
+
+$result_texis{'definfoenclose_with_empty_arg'} = '
address@hidden headword, , :
+
+My @headword{something}.
+
+';
+
+
+$result_texts{'definfoenclose_with_empty_arg'} = '
+
+My something.
+
+';
+
+$result_errors{'definfoenclose_with_empty_arg'} = [];
+
+
+
+$result_converted{'plaintext'}->{'definfoenclose_with_empty_arg'} = 'My
something:.
+
+';
+
+
+$result_converted{'html_text'}->{'definfoenclose_with_empty_arg'} = '<p>My
something:.
+</p>
+';
+
+
+$result_converted{'xml'}->{'definfoenclose_with_empty_arg'} = '
+<definfoenclose command="headword" open="" close=":"></definfoenclose>
+
+<para>My <infoenclose command="headword" begin=""
end=":">something</infoenclose>.
+</para>
+';
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp TODO Texinfo/Parser.pm t/08misc_comm...,
Patrice Dumas <=