[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Fri, 24 May 2024 13:35:47 -0400 (EDT) |
branch: master
commit 2aca2a00b590abde7ab3f2d23f8dd1b8b404cb31
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri May 24 19:35:28 2024 +0200
* tp/Makefile.am (test_files),
tp/t/input_files/first_file_same_parser.texi,
tp/t/input_files/last_file_same_parser.texi,
tp/t/input_files/next_file_same_parser.texi, tp/Makefile.tres,
t/same_parser_multiple_files.t: add a special test of reused parser
used to parser different files.
---
ChangeLog | 9 +
tp/Makefile.am | 3 +
tp/Makefile.tres | 7 +
.../res_html/chap.html | 54 ++++++
.../res_html/index.html | 47 +++++
.../res_html/results.html | 75 ++++++++
.../res_info/first_file_same_parser.info | Bin 0 -> 779 bytes
.../res_html/ichp.html | 35 ++++
.../res_html/index.html | 33 ++++
.../res_info/last_file_same_parser.info | 22 +++
.../res_html/chap-for-next.html | 42 +++++
.../res_html/index.html | 38 +++++
.../res_info/next_file_same_parser.info | 32 ++++
tp/t/same_parser_multiple_files.t | 189 +++++++++++++++++++++
14 files changed, 586 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index f0029a079b..7313e01da3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-05-24 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Makefile.am (test_files),
+ tp/t/input_files/first_file_same_parser.texi,
+ tp/t/input_files/last_file_same_parser.texi,
+ tp/t/input_files/next_file_same_parser.texi, tp/Makefile.tres,
+ t/same_parser_multiple_files.t: add a special test of reused parser
+ used to parser different files.
+
2024-05-24 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Tests.pm (@EXPORT_OK, create_group_directory)
diff --git a/tp/Makefile.am b/tp/Makefile.am
index 86abf569ba..bec267ab2d 100644
--- a/tp/Makefile.am
+++ b/tp/Makefile.am
@@ -237,6 +237,7 @@ test_files = \
t/input_files/encoding_index_latin1.texi \
t/input_files/encoding_index_utf8.texi \
t/input_files/end_of_lines_protected_non_ascii.texi \
+ t/input_files/first_file_same_parser.texi \
t/input_files/float_copying.texi \
t/input_files/formatting_customizations_input.texi \
t/input_files/glossary.texi \
@@ -251,6 +252,7 @@ test_files = \
t/input_files/index_table.texi \
t/input_files/japanese_utf8.texi \
t/input_files/japanese_shift_jis.texi \
+ t/input_files/last_file_same_parser.texi \
t/input_files/manual_simple_utf8_with_error.texi \
t/input_files/manual_simple_latin1_with_error.texi \
t/input_files/minimal_empty_empty.texi \
@@ -259,6 +261,7 @@ test_files = \
t/input_files/minimal_only_input_line.texi \
t/input_files/multiple_include_encodings.texi \
t/input_files/navigation.texi \
+ t/input_files/next_file_same_parser.texi \
t/input_files/nodequote.texi \
t/input_files/nodes_before_top.texi \
t/input_files/nodes_before_top_and_sections.texi \
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index e6f90b0f73..7dc16f7125 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -53,6 +53,7 @@ test_tap_files_generated_list = \
t/protect_character_in_texinfo.t \
t/raw_text_converter.t \
t/reference_to_text_in_tree.t \
+ t/same_parser_multiple_files.t \
t/test_brace_count.t \
t/test_fill_gaps_in_sectioning.t \
t/test_is_content_empty.t \
@@ -1872,6 +1873,12 @@ test_files_generated_list =
$(test_tap_files_generated_list) \
t/results/regions/ref_in_copying.pl \
t/results/regions/ref_in_copying_insert_in_chapter.pl \
t/results/regions/today_in_copying.pl \
+
t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html
\
+
t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_info
\
+
t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_html
\
+
t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_info
\
+
t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_html
\
+
t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_info
\
t/results/sectioning/a_comma_after_node.pl \
t/results/sectioning/anchor_zero.pl \
t/results/sectioning/at_commands_in_node.pl \
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html/chap.html
b/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html/chap.html
new file mode 100644
index 0000000000..a5947e8760
--- /dev/null
+++
b/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html/chap.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>chap (First File)</title>
+
+<meta name="description" content="chap (First File)">
+<meta name="keywords" content="chap (First File)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<link href="results.html" rel="index" title="results">
+
+
+</head>
+
+<body lang="en">
+<div class="chapter-level-extent" id="chap">
+<div class="nav-panel">
+<p>
+[<a href="results.html" title="Index" rel="index">Index</a>]</p>
+</div>
+<hr>
+
+
+<p><abbr class="abbr" title="Abr Because Casual mlo">ABC</abbr> (Abr Because
Casual mlo).
+</p>
+<p><abbr class="abbr" title="Abr Because Casual mlo">ABC</abbr>.
+</p>
+<a class="index-entry-id" id="index-fentry"></a>
+
+<p><a class="email" href="mailto:addr">name</a>.
+</p>
+<p><a class="email" href="mailto:bb%20eol%20">bb eol
+
+</a></p><p>more, etext
+</p>
+<p>after.
+</p>
+
+
+<p><a class="email" href="mailto:in">in</a>
+</p>
+
+
+</div>
+
+
+
+</body>
+</html>
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html/index.html
b/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html/index.html
new file mode 100644
index 0000000000..f33287bfe3
--- /dev/null
+++
b/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html/index.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Top (First File)</title>
+
+<meta name="description" content="Top (First File)">
+<meta name="keywords" content="Top (First File)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="#Top" rel="start" title="Top">
+<link href="results.html" rel="index" title="results">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+span:hover a.copiable-link {visibility: visible}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+
+
+<div class="top-level-extent">
+<div class="nav-panel">
+<p>
+[<a href="results.html" title="Index" rel="index">Index</a>]</p>
+</div>
+<hr>
+<h1 class="node" id="Top"><span>Top<a class="copiable-link" href="#Top">
¶</a></span></h1>
+
+</div>
+<hr>
+<div class="nav-panel">
+<p>
+[<a href="results.html" title="Index" rel="index">Index</a>]</p>
+</div>
+
+
+
+</body>
+</html>
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html/results.html
b/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html/results.html
new file mode 100644
index 0000000000..a3903e5367
--- /dev/null
+++
b/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_html/results.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>results (First File)</title>
+
+<meta name="description" content="results (First File)">
+<meta name="keywords" content="results (First File)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<link href="#results" rel="index" title="results">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+a.summary-letter-printindex {text-decoration: none}
+span:hover a.copiable-link {visibility: visible}
+strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
+td.printindex-index-entry {vertical-align: top}
+td.printindex-index-section {vertical-align: top; padding-left: 1em}
+th.entries-header-printindex {text-align:left}
+th.sections-header-printindex {text-align:left; padding-left: 1em}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+<div class="appendix-level-extent" id="results">
+<div class="nav-panel">
+<p>
+[<a href="#results" title="Index" rel="index">Index</a>]</p>
+</div>
+<hr>
+
+
+<dl class="first-deftypeop">
+<dt class="deftypeop" id="index-a1-on-op"><span class="category-def">MyCat de
<code class="code">op</code> : </span><span><code
class="def-type">dtype</code> <strong class="def-name">a1</strong> <code
class="def-code-arguments">( a2)</code><a class="copiable-link"
href="#index-a1-on-op"> ¶</a></span></dt>
+<dd><p>NOW Some def AND <strong class="strong">and more</strong>
+</p></dd></dl>
+
+<div class="printindex fn-printindex">
+<table class="fn-letters-header-printindex"><tr><th>Aller à:
</th><td><a class="summary-letter-printindex"
href="#results_fn_letter-A"><b>A</b></a>
+
+<a class="summary-letter-printindex" href="#results_fn_letter-F"><b>F</b></a>
+
+</td></tr></table>
+<table class="fn-entries-printindex" border="0">
+<tr><td></td><th class="entries-header-printindex">Entrée
d’index</th><th class="sections-header-printindex">Section</th></tr>
+<tr><td colspan="3"><hr></td></tr>
+<tr><th id="results_fn_letter-A">A</th></tr>
+<tr><td></td><td class="printindex-index-entry"><a
href="#index-a1-on-op"><code>a1 de op</code></a></td><td
class="printindex-index-section"><a href="#results">results</a></td></tr>
+<tr><td colspan="3"><hr></td></tr>
+<tr><th id="results_fn_letter-F">F</th></tr>
+<tr><td></td><td class="printindex-index-entry"><a
href="chap.html#index-fentry"><code>fentry</code></a></td><td
class="printindex-index-section"><a href="chap.html">chap</a></td></tr>
+<tr><td colspan="3"><hr></td></tr>
+</table>
+<table class="fn-letters-footer-printindex"><tr><th>Aller à:
</th><td><a class="summary-letter-printindex"
href="#results_fn_letter-A"><b>A</b></a>
+
+<a class="summary-letter-printindex" href="#results_fn_letter-F"><b>F</b></a>
+
+</td></tr></table>
+</div>
+
+
+</div>
+
+
+
+</body>
+</html>
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_info/first_file_same_parser.info
b/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_info/first_file_same_parser.info
new file mode 100644
index 0000000000..8aa85cf76c
Binary files /dev/null and
b/tp/t/results/same_parser_multiple_files/three_files_first_file_same_parser/res_info/first_file_same_parser.info
differ
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_html/ichp.html
b/tp/t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_html/ichp.html
new file mode 100644
index 0000000000..956ccb451d
--- /dev/null
+++
b/tp/t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_html/ichp.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>ichp (Title)</title>
+
+<meta name="description" content="ichp (Title)">
+<meta name="keywords" content="ichp (Title)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+span:hover a.copiable-link {visibility: visible}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+<h4 class="node" id="ichp"><span>ichp<a class="copiable-link" href="#ichp">
¶</a></span></h4>
+
+
+
+<p>J {No value for ‘myval’}.
+</p>
+
+
+</body>
+</html>
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_html/index.html
b/tp/t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_html/index.html
new file mode 100644
index 0000000000..7962856300
--- /dev/null
+++
b/tp/t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_html/index.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Top (Title)</title>
+
+<meta name="description" content="Top (Title)">
+<meta name="keywords" content="Top (Title)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="#Top" rel="start" title="Top">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+span:hover a.copiable-link {visibility: visible}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+<h1 class="title">Title</h1>
+<h1 class="node" id="Top"><span>Top<a class="copiable-link" href="#Top">
¶</a></span></h1>
+<hr>
+
+
+
+</body>
+</html>
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_info/last_file_same_parser.info
b/tp/t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_info/last_file_same_parser.info
new file mode 100644
index 0000000000..0c13198d79
--- /dev/null
+++
b/tp/t/results/same_parser_multiple_files/three_files_last_file_same_parser/res_info/last_file_same_parser.info
@@ -0,0 +1,22 @@
+This is last_file_same_parser.info, produced from
+last_file_same_parser.texi.
+
+
+File: last_file_same_parser.info, Node: Top, Up: (dir)
+
+
+File: last_file_same_parser.info, Node: ichp
+
+J {No value for 'myval'}.
+
+
+Tag Table:
+Node: Top79
+Node: ichp139
+
+End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_html/chap-for-next.html
b/tp/t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_html/chap-for-next.html
new file mode 100644
index 0000000000..3f350722d2
--- /dev/null
+++
b/tp/t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_html/chap-for-next.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>chap for next (Next File)</title>
+
+<meta name="description" content="chap for next (Next File)">
+<meta name="keywords" content="chap for next (Next File)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<link href="#chap-for-next" rel="index" title="chap for next">
+
+
+</head>
+
+<body lang="en">
+<div class="chapter-level-extent" id="chap-for-next">
+<div class="nav-panel">
+<p>
+[<a href="#chap-for-next" title="Index" rel="index">Index</a>]</p>
+</div>
+<hr>
+
+
+
+
+<p>FF toto.
+</p>
+<p>error→.
+</p>
+<p>mlo.
+</p>
+</div>
+
+
+
+</body>
+</html>
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_html/index.html
b/tp/t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_html/index.html
new file mode 100644
index 0000000000..1fd33cc6b2
--- /dev/null
+++
b/tp/t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_html/index.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Top (Next File)</title>
+
+<meta name="description" content="Top (Next File)">
+<meta name="keywords" content="Top (Next File)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="#Top" rel="start" title="Top">
+<link href="chap-for-next.html" rel="index" title="chap for next">
+
+
+</head>
+
+<body lang="en">
+<div class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+[<a href="chap-for-next.html" title="Index" rel="index">Index</a>]</p>
+</div>
+<hr>
+
+</div>
+<hr>
+<div class="nav-panel">
+<p>
+[<a href="chap-for-next.html" title="Index" rel="index">Index</a>]</p>
+</div>
+
+
+
+</body>
+</html>
diff --git
a/tp/t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_info/next_file_same_parser.info
b/tp/t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_info/next_file_same_parser.info
new file mode 100644
index 0000000000..b6ffd9cedc
--- /dev/null
+++
b/tp/t/results/same_parser_multiple_files/three_files_next_file_same_parser/res_info/next_file_same_parser.info
@@ -0,0 +1,32 @@
+This is next_file_same_parser.info, produced from
+next_file_same_parser.texi.
+
+
+File: next_file_same_parser.info, Node: Top, Up: (dir)
+
+Next File
+*********
+
+
+File: next_file_same_parser.info, Node: chap for next
+
+Chap for Next
+*************
+
+FF toto.
+
+ error→.
+
+ mlo.
+
+
+Tag Table:
+Node: Top79
+Node: chap for next160
+
+End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:
diff --git a/tp/t/same_parser_multiple_files.t
b/tp/t/same_parser_multiple_files.t
new file mode 100644
index 0000000000..23602599c5
--- /dev/null
+++ b/tp/t/same_parser_multiple_files.t
@@ -0,0 +1,189 @@
+use strict;
+
+use lib '.';
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
+
+use Test::More;
+
+BEGIN { plan tests => 10; }
+
+use File::Spec;
+# for fileparse
+use File::Basename;
+
+use Texinfo::Tests qw(compare_dirs_files unlink_dir_files
+ prepare_format_directories);
+
+use Texinfo::Parser;
+#use Texinfo::Convert::Plaintext;
+use Texinfo::Convert::Info;
+use Texinfo::Convert::HTML;
+
+# The test in this file tests parsing multiple files with the
+# same parser.
+
+# NOTE the references need to be updated manually, by copying
+# out_* directories files
+
+
+
+# NOTE same as in t/no_structure_test.t
+sub _do_format_test_file($$$$$$)
+{
+ my $test_name = shift;
+ my $format = shift;
+ my $converter = shift;
+ my $document = shift;
+ my $test_out_dir = shift;
+ my $reference_dir = shift;
+
+ my $format_type = $format;
+
+ my $result = $converter->output($document);
+ if (!defined($result)) {
+ my $converter_errors = $converter->get_converter_errors();
+ my $converter_registrar = Texinfo::Report::new();
+ foreach my $error (@$converter_errors) {
+ $converter_registrar->add_formatted_message($error);
+ }
+ my ($errors, $error_nrs) = $converter_registrar->errors();
+ foreach my $error_message (@$errors) {
+ warn "$format_type: ".$error_message->{'error_line'};
+ }
+ }
+
+ my $results_dir = $test_out_dir;
+ if (-d $reference_dir) {
+ my $errors = compare_dirs_files($reference_dir, $results_dir);
+ ok (!defined($errors), $test_name.' converted '.$format)
+ or diag (join("\n", @$errors));
+ } else {
+ print STDERR "\n$format $test_name: \n$results_dir\n";
+ }
+}
+
+
+
+my $debug = 0;
+#my $debug = 1;
+
+my $srcdir = $ENV{'srcdir'};
+if (defined($srcdir)) {
+ $srcdir =~ s/\/*$/\//;
+} else {
+ $srcdir = '.';
+}
+
+my $test_group = 'same_parser_multiple_files';
+
+sub _run_test($$$)
+{
+ my $test_name = shift;
+ my $files = shift;
+ my $parser_conf = shift;
+
+ print STDERR "TEST $test_name\n" if ($debug);
+
+ my $test_parser = Texinfo::Parser::parser($parser_conf);
+
+ foreach my $test_file_and_errors (@$files) {
+ my ($test_file, $reference_parsing_errors) = @$test_file_and_errors;
+ my $bfile = fileparse($test_file, '.texi');
+ my $test_file_name = "${test_name}_${bfile}";
+
+ my $document = $test_parser->Texinfo::Parser::parse_texi_file($test_file);
+
+ my $parsing_errors = '';
+ my ($test_parser_errors, $test_parser_error_count) =
$test_parser->errors();
+ foreach my $error_message (@$test_parser_errors) {
+ $parsing_errors .= $error_message->{'error_line'};
+ }
+
+ if (!defined($document)) {
+ warn "$bfile:\n$parsing_errors";
+ exit(1);
+ }
+ if (!defined($reference_parsing_errors)) {
+ print STDERR "$bfile:\n$parsing_errors";
+ } else {
+ is ($parsing_errors, $reference_parsing_errors,
+ "$test_file_name parsing errors");
+ }
+
+ #my $plaintext_converter = Texinfo::Convert::Plaintext->converter();
+ #my $plaintext = $plaintext_converter->convert($document);
+ #print STDERR "'$plaintext'\n";
+
+ my $format = 'info';
+ my ($info_test_out_dir, $info_reference_dir)
+ = prepare_format_directories($srcdir, $test_group, $test_file_name,
$format);
+
+ my $info_converter
+ = Texinfo::Convert::Info->converter({'SUBDIR' => $info_test_out_dir});
+
+ _do_format_test_file($test_file_name, $format, $info_converter, $document,
+ $info_test_out_dir, $info_reference_dir);
+
+ $format = 'html';
+ my ($html_test_out_dir, $html_reference_dir)
+ = prepare_format_directories($srcdir, $test_group, $test_file_name,
$format);
+
+ my $html_converter = Texinfo::Convert::HTML->converter({
+ 'SUBDIR' => $html_test_out_dir,});
+ _do_format_test_file($test_file_name, $format, $html_converter, $document,
+ $html_test_out_dir, $html_reference_dir);
+
+ }
+}
+
+ok(1, "modules loading");
+
+Texinfo::Tests::create_group_directory($test_group);
+
+
+my $updir = File::Spec->updir();
+my $manual_file = File::Spec->catfile($srcdir, $updir, 'doc', 'texinfo.texi');
+my $manual_include_dir = File::Spec->catdir($srcdir, $updir, 'doc');
+my $coverage_file = File::Spec->catfile($srcdir, 'tests', 'coverage',
'formatting.texi');
+my $coverage_include_dir = File::Spec->catdir($srcdir, 'tests');
+
+my $cpp_lines_file = File::Spec->catfile($srcdir, 't', 'input_files',
+ 'cpp_lines.texi');
+my $index_nodes_file = File::Spec->catfile($srcdir, 't', 'input_files',
+ 'index_nodes.texi');
+my $first_file = File::Spec->catfile($srcdir, 't', 'input_files',
+ 'first_file_same_parser.texi');
+my $next_file = File::Spec->catfile($srcdir, 't', 'input_files',
+ 'next_file_same_parser.texi');
+my $last_file = File::Spec->catfile($srcdir, 't', 'input_files',
+ 'last_file_same_parser.texi');
+
+my $t_include_include_dir = File::Spec->catdir($srcdir, 't', 'include');
+
+# TODO test setting specific values in parser initialization and checking
+# that they are used in both files, but also that the values @set in the first
file
+# are not set in the second file.
+
+my $test_include_dirs = [$t_include_include_dir,
+ $manual_include_dir, $coverage_include_dir, 'a'];
+
+
+my $first_file_parsing_errors = '@email missing closing brace
+misplaced }
+';
+my $next_file_parsing_errors = 'unknown command `macrtwo\'
+misplaced {
+misplaced }
+';
+my $last_file_parsing_errors = 'unknown command `macrtwo\'
+misplaced {
+misplaced }
+warning: undefined flag: myval
+';
+_run_test('three_files', [[$first_file, $first_file_parsing_errors],
+ [$next_file, $next_file_parsing_errors],
+ [$last_file, $last_file_parsing_errors]],
+ {'INCLUDE_DIRECTORIES' => $test_include_dirs,
+ 'DEBUG' => $debug, 'values' => {'abc' => 'mlo'}});
+
+