texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sun, 8 Sep 2024 17:50:10 -0400 (EDT)

branch: master
commit c918a68ac2bf8adeb7f55a96ce61aa8b400eaebb
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Sep 8 20:03:44 2024 +0200

    * tp/t/test_utils.pl (test): if doing epub, set init_files_options
    EPUB_CREATE_CONTAINER_FILE in the default case.
---
 ChangeLog          | 5 +++++
 tp/t/epub_tests.t  | 9 +++------
 tp/t/test_utils.pl | 7 +++++++
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 55a816aa11..3bec6fafa6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-09-08  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/t/test_utils.pl (test): if doing epub, set init_files_options
+       EPUB_CREATE_CONTAINER_FILE in the default case.
+
 2024-09-08  Patrice Dumas  <pertusus@free.fr>
 
        * tp/maintain/check_epubcheck_texi_t.sh: sort first level directories.
diff --git a/tp/t/epub_tests.t b/tp/t/epub_tests.t
index 32ec4915af..0d3b55a29e 100644
--- a/tp/t/epub_tests.t
+++ b/tp/t/epub_tests.t
@@ -16,8 +16,7 @@ my @file_tests = (
 
 @setfilename a bit too late
 ', {'init_files' => ['epub3.pm'],
-    'test_input_file_name' => 'very badly placed setfilename.texi'},
-   {'EPUB_CREATE_CONTAINER_FILE' => 0}],
+    'test_input_file_name' => 'very badly placed setfilename.texi'},],
 # test for the nav file
 ['chapter_before_top_epub',
 '@node Top
@@ -28,15 +27,13 @@ my @file_tests = (
 @part part
 
 @top top
-', {'init_files' => ['epub3.pm']},
-   {'EPUB_CREATE_CONTAINER_FILE' => 0}],
+', {'init_files' => ['epub3.pm']},],
 ['section_part_epub',
 '@node Top
 @section section
 
 @part part
-', {'init_files' => ['epub3.pm']},
-   {'EPUB_CREATE_CONTAINER_FILE' => 0}],
+', {'init_files' => ['epub3.pm']},],
 );
 
 foreach my $test (@file_tests) {
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 6d9fd57467..a925f75ae0 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -903,6 +903,11 @@ sub test($$)
         Texinfo::Config::GNUT_load_init_file($file);
         if ($filename eq 'epub3.pm') {
           $doing_epub = 1;
+          # we override init_files_options, as the priority between
+          # converter_options and init_files_options is not well defined.
+          if (!defined($converter_options->{'EPUB_CREATE_CONTAINER_FILE'})) {
+            $init_files_options->{'EPUB_CREATE_CONTAINER_FILE'} = 0;
+          }
         }
       } else {
         warn (sprintf("could not read init file %s", $filename));
@@ -1157,6 +1162,8 @@ sub test($$)
 
   foreach my $format (@tested_formats) {
     if (defined($formats{$format})) {
+      # FIXME is it ok in term of priority?  If a key is in both, last
+      # one is kept, which means priority for init_files_options.
       my $format_converter_options = {%$converter_options,
                                       %$init_files_options};
       my $format_type = $format;



reply via email to

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