texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: more parse_texi_line tests


From: Patrice Dumas
Subject: branch master updated: more parse_texi_line tests
Date: Sun, 09 Jan 2022 08:09:36 -0500

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 2266345589 more parse_texi_line tests
2266345589 is described below

commit 2266345589b888b84573aa56aef4267b8d57b61f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 9 14:09:14 2022 +0100

    more parse_texi_line tests
---
 tp/t/test_parse_texi_line.t | 46 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 45 insertions(+), 1 deletion(-)

diff --git a/tp/t/test_parse_texi_line.t b/tp/t/test_parse_texi_line.t
index e16545e444..2d441f8e62 100644
--- a/tp/t/test_parse_texi_line.t
+++ b/tp/t/test_parse_texi_line.t
@@ -5,7 +5,7 @@ use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
 
 use Test::More;
 
-BEGIN { plan tests => 7; }
+BEGIN { plan tests => 30; }
 
 use Texinfo::Convert::Texinfo;
 use Texinfo::Parser;
@@ -51,9 +51,53 @@ my @tests = (
   [':1: warning: @exdent should only appear at the beginning of a line']],
 ["aa \@exdent in exdent\n", 'exdent error with end line',
   [':1: warning: @exdent should only appear at the beginning of a line']],
+['@node node
+a node
+
+@setfilename long.info
+
+@copying
+In copying
+@end copying
+
+@float type, a
+@verbatim
+in verbatim
+@end verbatim
+@caption{in caption}
+@end float
+
+@cindex in index
+
+@node node 2
+@chapter chap
+
+in chapter
+
+@columnfractions a b
+
+@printindex cp
+@listoffloats type
+
+@bye
+', 'long example', [':4: warning: @setfilename after the first element',
+                    ':24: column fraction not a number: a',
+                    ':24: column fraction not a number: b',
+                    ':20: @columnfractions only meaningful on a @multitable 
line',
+]]
 );
 
 foreach my $test_string_explanation (@tests) {
   my ($texi_string, $explanation, $error_messages) = @$test_string_explanation;
   test_line(undef, $texi_string, $explanation, $error_messages);
 }
+
+# test with the same aprser reused
+my $parser = Texinfo::Parser::parser();
+
+my @concatenated_error_messages = ();
+foreach my $test_string_explanation (@tests) {
+  my ($texi_string, $explanation, $error_messages) = @$test_string_explanation;
+  push @concatenated_error_messages, @$error_messages if 
(defined($error_messages));
+  test_line($parser, $texi_string, $explanation, 
\@concatenated_error_messages);
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]