texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/HTML.pm (_do_js_files, outpu


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/HTML.pm (_do_js_files, output): move code related to js files, both for INFO_JS_DIR and for js license file also for mathjax to the _do_js_files function. Call _do_js_files also if there is no output file, but only if TEST is not set, a combination which is very unlikely.
Date: Mon, 30 Oct 2023 18:07:11 -0400

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 3e99ac0c47 * tp/Texinfo/Convert/HTML.pm (_do_js_files, output): move 
code related to js files, both for INFO_JS_DIR and for js license file also for 
mathjax to the _do_js_files function.  Call _do_js_files also if there is no 
output file, but only if TEST is not set, a combination which is very unlikely.
3e99ac0c47 is described below

commit 3e99ac0c478e6d31905513de8d0568063286aead
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Oct 30 23:06:59 2023 +0100

    * tp/Texinfo/Convert/HTML.pm (_do_js_files, output): move code related
    to js files, both for INFO_JS_DIR and for js license file also for
    mathjax to the _do_js_files function.  Call _do_js_files also if there
    is no output file, but only if TEST is not set, a combination which is
    very unlikely.
    
    * tp/Texinfo/Convert/HTML.pm (output), tp/t/test_utils.pl: update
    comments, in particular in output on unreachable code, as code that is
    unreachable corresponds to the case output_file ne '' and no pages.
    
    * tp/Makefile.tres, tp/t/html_tests.t (info_js_dir_html)
    (info_js_dir_html_text, mathjax_with_texinfo_html_file)
    (info_js_dir_html_file): more tests to test INFO_JS_DIR and check when
    associated files are created.
    
    * Changelog: remove some spaces.
---
 ChangeLog                                          |  47 ++-
 tp/Makefile.tres                                   |   6 +
 tp/Texinfo/Convert/HTML.pm                         | 154 +++++-----
 tp/t/html_tests.t                                  |  17 ++
 tp/t/results/html_tests/info_js_dir_html.pl        | 331 +++++++++++++++++++++
 tp/t/results/html_tests/info_js_dir_html_file.pl   | 274 +++++++++++++++++
 .../info_js_dir_html_file/res_html/chap.html       |  42 +++
 .../info_js_dir_html_file/res_html/index.html      |  50 ++++
 .../info_js_dir_html_file/res_html/js/info.css     |   0
 .../info_js_dir_html_file/res_html/js/info.js      |   0
 .../info_js_dir_html_file/res_html/js/modernizr.js |   0
 .../res_html/js_licenses.html                      |  16 +
 tp/t/results/html_tests/info_js_dir_html_text.pl   | 287 ++++++++++++++++++
 .../html_tests/mathjax_with_texinfo_html_file.pl   | 294 ++++++++++++++++++
 .../res_html/index.html                            |  36 +++
 .../res_html/js_licenses.html                      |  11 +
 tp/t/test_utils.pl                                 |   3 +
 17 files changed, 1486 insertions(+), 82 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f627e4dad1..10c40f7ede 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2023-10-30  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_do_js_files, output): move code related
+       to js files, both for INFO_JS_DIR and for js license file also for
+       mathjax to the _do_js_files function.  Call _do_js_files also if there
+       is no output file, but only if TEST is not set, a combination which is
+       very unlikely.
+       
+       * tp/Texinfo/Convert/HTML.pm (output), tp/t/test_utils.pl: update
+       comments, in particular in output on unreachable code, as code that is
+       unreachable corresponds to the case output_file ne '' and no pages.
+
+       * tp/Makefile.tres, tp/t/html_tests.t (info_js_dir_html)
+       (info_js_dir_html_text, mathjax_with_texinfo_html_file)
+       (info_js_dir_html_file): more tests to test INFO_JS_DIR and check when
+       associated files are created.
+
+       * Changelog: remove some spaces.
+
 2023-10-30  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (output): move js files copying code out
@@ -1068,7 +1087,7 @@
 2023-10-21  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/utils.h (FILE_SOURCE_INFO,
-       FILE_SOURCE_INFO_LIST), tp/Texinfo/XS/convert/convert_html.h: move to 
+       FILE_SOURCE_INFO_LIST), tp/Texinfo/XS/convert/convert_html.h: move to
        utils.h from convert_html.h.
 
        * tp/Texinfo/Convert/HTML.pm (_prepare_units_directions_files),
@@ -1277,7 +1296,7 @@
 2023-10-19  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/convert_html.h,
-       tp/Texinfo/XS/convert/indices_in_conversion.h, 
+       tp/Texinfo/XS/convert/indices_in_conversion.h,
        tp/Texinfo/XS/main/utils.h (html_conversion_context_type_names)
        (KEY_ALPHA, SORTABLE_ENTRY, INDEX_SORTABLE_ENTRIES):  move definitions
        to utils.h.
@@ -1345,9 +1364,9 @@
        tp/t/languages.t: always use a string for SPLIT customization
        variable, so replace 0 by ''.
 
-       * tp/Texinfo/Structuring.pm (import, clear_document_errors), 
+       * tp/Texinfo/Structuring.pm (import, clear_document_errors),
        tp/Texinfo/XS/structuring_transfo/StructuringTransfo.xs
-       (clear_document_errors), tp/t/test_utils.pl (test), tp/texi2any.pl: 
+       (clear_document_errors), tp/t/test_utils.pl (test), tp/texi2any.pl:
        add an XS interface to clear_document_errors in Texinfo/Structuring.pm
        and use it in test_utils.pl and texi2any.pl after passing document
        errors.
@@ -2232,7 +2251,7 @@
 
        * tp/Texinfo/Structuring.pm (import, _XS_split_by_node)
        (split_by_node), tp/Texinfo/XS/main/build_perl_info.c
-       (output_unit_to_perl_hash, build_output_units_list), 
+       (output_unit_to_perl_hash, build_output_units_list),
        tp/Texinfo/XS/main/tree_types.h (enum output_unit_type, OUTPUT_UNIT)
        (OUTPUT_UNIT_LIST), tp/Texinfo/XS/main/utils.c
        (output_unit_type_names),
@@ -2723,7 +2742,7 @@
        tp/Texinfo/XS/main/utils.c, tp/Texinfo/XS/main/floats.c
        (add_to_float_record_list, find_float_type)
        (float_list_to_listoffloats_list, destroy_listoffloats_list)
-       (parse_float_type), tp/Texinfo/XS/parsetexi/api.c (store_document), 
+       (parse_float_type), tp/Texinfo/XS/parsetexi/api.c (store_document),
        tp/Texinfo/XS/parsetexi/end_line.c (float_records): move floats
        related function to a new main/floats.c file.  Use a FLOAT_RECORD_LIST
        as global float_records structure.
@@ -3196,7 +3215,7 @@
        (text_accents, text_heading, convert_to_text_internal)
        (convert_to_text), tp/Texinfo/XS/main/get_perl_info.c
        (copy_sv_options_for_convert_text): rename TEXT_OPTIONS options as
-       text_options. 
+       text_options.
 
 2023-09-14  Patrice Dumas  <pertusus@free.fr>
 
@@ -3851,7 +3870,7 @@
        tp/Texinfo/XS/main/utils.h (ENCODING_CONVERSION)
        (ENCODING_CONVERSION_LIST), tp/Texinfo/XS/parsetexi/api.c
        (reset_parser_except_conf), tp/Texinfo/XS/parsetexi/input.c
-       (input_conversions, set_input_encoding, parser_reset_encoding_list):  
+       (input_conversions, set_input_encoding, parser_reset_encoding_list):
        move code related to setting up conversions from set_input_encoding in
        parsetexi/input.c to main/utils.c, move reset_encoding_list,
        text_buffer_iconv and encode_with_iconv.  Use an
@@ -4339,7 +4358,7 @@
 
 2023-08-25  Patrice Dumas  <pertusus@free.fr>
 
-       * tp/t/test_utils.pl (test), tp/texi2any.pl b/tp/texi2any.pl, 
+       * tp/t/test_utils.pl (test), tp/texi2any.pl b/tp/texi2any.pl,
        tp/Texinfo/Convert/Info.pm (output): determine top node with
        identifiers_target instead of {'structuring'}->{'top_node'}
        in Info.pm.  Remove now unused {'structuring'}->{'top_node'}.
@@ -4376,7 +4395,7 @@
        (directions_length): setup extern structures related to directions in
        utils.c.
 
-       * tp/Texinfo/Structuring.pm (import, _XS_nodes_tree, nodes_tree), 
+       * tp/Texinfo/Structuring.pm (import, _XS_nodes_tree, nodes_tree),
        tp/Texinfo/XS/structuring_transfo/StructuringTransfo.xs (nodes_tree),
        tp/Texinfo/XS/structuring_transfo/structuring.c
        (section_direction_associated_node, nodes_tree): implement nodes_tree
@@ -4707,7 +4726,7 @@
 2023-08-20  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Structuring.pm (split_pages),
-       tp/Texinfo/Convert/Converter.pm (_set_tree_units_files), 
+       tp/Texinfo/Convert/Converter.pm (_set_tree_units_files),
        tp/Texinfo/Convert/HTML.pm (_html_set_pages_files): put
        'first_in_page' directly in tree unit.
 
@@ -5829,7 +5848,7 @@
 2023-08-08  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/utils.c (delete_global_info),
-       tp/Texinfo/XS/parsetexi/parser.c (wipe_parser_global_info): 
+       tp/Texinfo/XS/parsetexi/parser.c (wipe_parser_global_info):
        rename wipe_global_info as wipe_parser_global_info.  Split
        code that free GLOBAL_INFO structure out of wipe_parser_global_info to
        utils.c, renaming it delete_global_info, and call delete_global_info
@@ -5874,7 +5893,7 @@
        tp/Texinfo/XS/parsetexi/build_perl_info.c (build_texinfo_tree)
        (build_target_elements_list, build_identifiers_target)
        (build_internal_xref_list, build_float_list, build_index_data)
-       (build_global_info, build_global_info2, build_document): 
+       (build_global_info, build_global_info2, build_document):
        do not expose to perl code and add arguments for build_texinfo_tree,
        build_target_elements_list, build_identifiers_target,
        build_internal_xref_list, build_float_list, build_index_data and
@@ -6409,7 +6428,7 @@
        set_nodes_list_labels.
 
        * tp/Texinfo/XS/parsetexi/node_name_normalization.c
-       (convert_to_normalized_internal): fix ref* conversion, fix 
+       (convert_to_normalized_internal): fix ref* conversion, fix
        check of empty ref argument.
        (protect_unicode_char): avoid spurious error with empty next.
        (unicode_to_protected): initialize to an empty line.
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index c3e57fdfe4..4db1b7998e 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -632,6 +632,10 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/html_tests/image_link_prefix.pl \
   t/results/html_tests/index_and_node_same_name.pl \
   t/results/html_tests/index_below.pl \
+  t/results/html_tests/info_js_dir_html.pl \
+  t/results/html_tests/info_js_dir_html_file.pl \
+  t/results/html_tests/info_js_dir_html_file/res_html \
+  t/results/html_tests/info_js_dir_html_text.pl \
   t/results/html_tests/itemize_arguments.pl \
   t/results/html_tests/itemize_arguments/res_html \
   t/results/html_tests/itemize_arguments_enable_encoding.pl \
@@ -639,6 +643,8 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/html_tests/mathjax_with_texinfo.pl \
   t/results/html_tests/mathjax_with_texinfo_enable_encoding.pl \
   t/results/html_tests/mathjax_with_texinfo_enable_encoding/res_latex \
+  t/results/html_tests/mathjax_with_texinfo_html_file.pl \
+  t/results/html_tests/mathjax_with_texinfo_html_file/res_html \
   t/results/html_tests/mathjax_with_texinfo_html_text.pl \
   t/results/html_tests/mathjax_with_texinfo_no_convert_to_latex.pl \
   t/results/html_tests/menu.pl \
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 84b153ab99..23a5aa3d8b 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -11348,6 +11348,71 @@ sub _reset_info()
   }
 }
 
+sub _do_js_files($$)
+{
+  my $self = shift;
+  my $destination_directory = shift;
+
+  if ($self->get_conf('INFO_JS_DIR')) {
+    my $info_js_dir = $self->get_conf('INFO_JS_DIR');
+    my $jsdir;
+    if ($destination_directory ne '') {
+      $jsdir = File::Spec->catdir($destination_directory, $info_js_dir);
+    } else {
+      $jsdir = $info_js_dir;
+    }
+    if (!-d $jsdir) {
+      if (-f $jsdir) {
+        $self->document_error($self,
+          sprintf(__("%s already exists but is not a directory"), $jsdir));
+      } else {
+        mkdir $jsdir;
+      }
+    }
+    # Copy JS files.
+    if (-d $jsdir) {
+      if (!$self->get_conf('TEST')) {
+        my $jssrcdir;
+        if (!$Texinfo::ModulePath::texinfo_uninstalled) {
+          $jssrcdir = File::Spec->catdir(
+            $Texinfo::ModulePath::pkgdatadir, 'js');
+        } else {
+          $jssrcdir = File::Spec->catdir(
+            $Texinfo::ModulePath::top_srcdir, 'js');
+        }
+        for my $f ('info.js', 'modernizr.js', 'info.css') {
+          my $from = File::Spec->catfile($jssrcdir, $f);
+
+          if (!copy($from, $jsdir)) {
+            $self->document_error($self,
+              sprintf(__("error on copying %s into %s"), $from, $jsdir));
+          }
+        }
+      } else {
+      # create empty files for tests to keep results stable.
+        for my $f ('info.js', 'modernizr.js', 'info.css') {
+          my $filename = File::Spec->catfile($jsdir, $f);
+          if (!open (FH, '>', $filename)) {
+            $self->document_error($self,
+              sprintf(__("error on creating empty %s: %s"),
+                      $filename, $!));
+          }
+          if (!close(FH)) {
+            $self->document_error($self,
+              sprintf(__("error on closing empty %s: %s"),
+                      $filename, $!));
+          }
+        }
+      }
+    }
+  }
+
+  my $jslicenses = $self->get_info('jslicenses');
+  if ($jslicenses and scalar(%$jslicenses)) {
+    $self->_do_jslicenses_file($destination_directory);
+  }
+}
+
 # Main function for outputting a manual in HTML.
 # $SELF is the output converter object of class Texinfo::Convert::HTML (this
 # module), and $DOCUMENT is the Texinfo parsed document from the parser.
@@ -11472,8 +11537,9 @@ sub output($$)
   }
   $self->_prepare_css();
 
-  # this sets OUTFILE, to be used if not split, but also
-  # 'destination_directory' and 'output_filename' that are useful when split.
+  # this sets OUTFILE, to be used if not split, but also 'output_filename'
+  # that is useful when split, 'destination_directory' that is mainly useful
+  # when split and 'document_name' that is generally useful.
   my ($output_file, $destination_directory, $output_filename,
               $document_name) = $self->determine_files_and_directory();
   my ($encoded_destination_directory, $dir_encoding)
@@ -11626,9 +11692,11 @@ sub output($$)
   if (!$output_units
       or !defined($output_units->[0]->{'unit_filename'})) {
     # no page
-    # NOTE there are always output units, and there is always a file
-    # associated, so this situation cannot happen.
+    # NOTE there are always output units.  There is always a file if files
+    # are setup, so this situation can only arise with output_file equal to ''
+    # as in that case files are not setup at all.
     if ($output_file ne '') {
+      # This should not be possible.
       my $no_page_output_filename;
       if ($self->get_conf('SPLIT')) {
         $no_page_output_filename = $self->top_node_filename($document_name);
@@ -11656,13 +11724,12 @@ sub output($$)
 
   if (!$output_units
       or !defined($output_units->[0]->{'unit_filename'})) {
-    # NOTE there are always output units, and there is always a file
-    # associated, so this situation cannot happen.
-    # A lot of unreachable code here...
     my $output = '';
     my $fh;
     my $encoded_no_page_out_filepath;
     my $no_page_out_filepath;
+    # current_filename eq '' and no output files should be the only
+    # possibility, see comment above.
     if ($self->{'current_filename'} ne ''
         and $self->{'out_filepaths'}
         and defined($self->{'out_filepaths'}->{$self->{'current_filename'}})) {
@@ -11723,7 +11790,15 @@ sub output($$)
       }
     }
     $self->{'current_filename'} = undef;
-    return $output if ($output_file eq '');
+    # $output_file eq '' should always be true, see comment above.
+    if ($output_file eq '') {
+      if (!$self->get_conf('TEST')) {
+        # This case is unlikely to happen, as there is no output file
+        # only if formatting is called as convert, which only happens in tests.
+        $self->_do_js_files($destination_directory);
+      }
+      return $output;
+    }
   } else {
     # output with pages
     print STDERR "DO Units with filenames\n"
@@ -11759,9 +11834,9 @@ sub output($$)
                                            "output unit $unit_nr");
       }
 
-      # register the element but do not print anything. Printing
+      # register the output but do not print anything. Printing
       # only when file_counters reach 0, to be sure that all the
-      # elements have been converted.
+      # elements have been converted before headers are done.
       if (!exists($files{$output_unit_filename})) {
         $files{$output_unit_filename} = {'first_unit' => $output_unit,
                                          'body' => ''};
@@ -11810,64 +11885,7 @@ sub output($$)
     delete $self->{'current_filename'};
   }
 
-  if ($self->get_conf('INFO_JS_DIR')) {
-    my $info_js_dir = $self->get_conf('INFO_JS_DIR');
-    my $jsdir;
-    if ($destination_directory ne '') {
-      $jsdir = File::Spec->catdir($destination_directory, $info_js_dir);
-    } else {
-      $jsdir = $info_js_dir;
-    }
-    if (!-d $jsdir) {
-      if (-f $jsdir) {
-        $self->document_error($self,
-          sprintf(__("%s already exists but is not a directory"), $jsdir));
-      } else {
-        mkdir $jsdir;
-      }
-    }
-    # Copy JS files.
-    if (-d $jsdir) {
-     if (!$self->get_conf('TEST')) {
-        my $jssrcdir;
-        if (!$Texinfo::ModulePath::texinfo_uninstalled) {
-          $jssrcdir = File::Spec->catdir(
-            $Texinfo::ModulePath::pkgdatadir, 'js');
-        } else {
-          $jssrcdir = File::Spec->catdir(
-            $Texinfo::ModulePath::top_srcdir, 'js');
-        }
-        for my $f ('info.js', 'modernizr.js', 'info.css') {
-          my $from = File::Spec->catfile($jssrcdir, $f);
-
-          if (!copy($from, $jsdir)) {
-            $self->document_error($self,
-              sprintf(__("error on copying %s into %s"), $from, $jsdir));
-          }
-        }
-      } else {
-      # create empty files for tests to keep results stable.
-        for my $f ('info.js', 'modernizr.js', 'info.css') {
-          my $filename = File::Spec->catfile($jsdir, $f);
-          if (!open (FH, '>', $filename)) {
-            $self->document_error($self,
-              sprintf(__("error on creating empty %s: %s"),
-                      $filename, $!));
-          }
-          if (!close(FH)) {
-            $self->document_error($self,
-              sprintf(__("error on closing empty %s: %s"),
-                      $filename, $!));
-          }
-        }
-      }
-    }
-  }
-
-  my $jslicenses = $self->get_info('jslicenses');
-  if ($jslicenses and scalar(%$jslicenses)) {
-    $self->_do_jslicenses_file($destination_directory);
-  }
+  $self->_do_js_files($destination_directory);
 
   my $finish_status = $self->run_stage_handlers($root, 'finish');
   return undef unless ($finish_status < $handler_fatal_error_level
diff --git a/tp/t/html_tests.t b/tp/t/html_tests.t
index f121292462..95502180eb 100644
--- a/tp/t/html_tests.t
+++ b/tp/t/html_tests.t
@@ -146,6 +146,15 @@ a@sup{b - \frac{\xi}{phi @copyright{}}} @dotless{i}
 Some @math{a @minus{} b @geq{} @AA{} @^e}.
 ';
 
+# nothing special, just a way to have the same for all the
+# info_js_dir tests
+my $info_js_dir_test = '@node top
+@top top
+
+@node chap
+@chapter Chapter
+';
+
 my $check_htmlxref_text = '
 @node Top, (../there/no_existing_no_manual_direction), first, (dir)
 @top top
@@ -649,6 +658,8 @@ $mathjax_with_texinfo, {'test_formats' => ['latex_text', 
'file_latex'],
 ['mathjax_with_texinfo_no_convert_to_latex',
 $mathjax_with_texinfo, {}, {'HTML_MATH' => 'mathjax',
                             'CONVERT_TO_LATEX_IN_MATH' => 0}],
+['info_js_dir_html',
+$info_js_dir_test, {}, {'INFO_JS_DIR' => 'js'}],
 ['empty_lines_at_beginning_no_setfilename',
 undef, {'test_file' => 'empty_lines_at_beginning_no_setfilename.texi'}
 ],
@@ -772,6 +783,8 @@ node name}
 '],
 ['mathjax_with_texinfo_html_text',
 $mathjax_with_texinfo, {}, {'HTML_MATH' => 'mathjax'}],
+['info_js_dir_html_text',
+$info_js_dir_test, {}, {'INFO_JS_DIR' => 'js'}],
 ['split_html_text',
 '@node Top
 @top top
@@ -1246,6 +1259,10 @@ $check_htmlxref_text
   {'contents' => 1, 'CONTENTS_OUTPUT_LOCATION' => 'separate_element',
    'SPLIT' => '', 'BIG_RULE' => '<hr style="height: 6px;">'}
 ],
+['mathjax_with_texinfo_html_file',
+$mathjax_with_texinfo, {}, {'HTML_MATH' => 'mathjax'}],
+['info_js_dir_html_file',
+$info_js_dir_test, {}, {'INFO_JS_DIR' => 'js'}],
 );
 
 
diff --git a/tp/t/results/html_tests/info_js_dir_html.pl 
b/tp/t/results/html_tests/info_js_dir_html.pl
new file mode 100644
index 0000000000..105f1a01d0
--- /dev/null
+++ b/tp/t/results/html_tests/info_js_dir_html.pl
@@ -0,0 +1,331 @@
+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 %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'info_js_dir_html'} = {
+  'contents' => [
+    {
+      'type' => 'before_node_section'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'is_target' => 1,
+        'normalized' => 'Top'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'top',
+      'contents' => [
+        {
+          'text' => '                            
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'extra' => {},
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 2,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chap'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'is_target' => 1,
+        'normalized' => 'chap'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 4,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Chap'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'chapter',
+      'extra' => {
+        'section_number' => '1'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 5,
+        'macro' => ''
+      }
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'info_js_dir_html'} = '@node Top
+@top top
+                            
+@node chap
+@chapter Chap
+';
+
+
+$result_texts{'info_js_dir_html'} = 'top
+***
+                            
+1 Chap
+******
+';
+
+$result_sectioning{'info_js_dir_html'} = {
+  'extra' => {
+    'section_childs' => [
+      {
+        'cmdname' => 'top',
+        'extra' => {
+          'associated_node' => {
+            'cmdname' => 'node',
+            'extra' => {
+              'normalized' => 'Top'
+            }
+          },
+          'section_childs' => [
+            {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'associated_node' => {
+                  'cmdname' => 'node',
+                  'extra' => {
+                    'normalized' => 'chap'
+                  }
+                },
+                'section_directions' => {
+                  'up' => {}
+                },
+                'section_level' => 1,
+                'section_number' => '1',
+                'toplevel_directions' => {
+                  'prev' => {},
+                  'up' => {}
+                }
+              }
+            }
+          ],
+          'section_level' => 0,
+          'sectioning_root' => {},
+          'toplevel_directions' => {}
+        }
+      }
+    ],
+    'section_level' => -1
+  }
+};
+$result_sectioning{'info_js_dir_html'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
 = $result_sectioning{'info_js_dir_html'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'info_js_dir_html'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'prev'}
 = $result_sectioning{'info_js_dir_html'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'info_js_dir_html'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'up'}
 = $result_sectioning{'info_js_dir_html'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'info_js_dir_html'}{'extra'}{'section_childs'}[0]{'extra'}{'sectioning_root'}
 = $result_sectioning{'info_js_dir_html'};
+
+$result_nodes{'info_js_dir_html'} = [
+  {
+    'cmdname' => 'node',
+    'extra' => {
+      'associated_section' => {
+        'cmdname' => 'top',
+        'extra' => {}
+      },
+      'node_directions' => {
+        'next' => {
+          'cmdname' => 'node',
+          'extra' => {
+            'associated_section' => {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'section_number' => '1'
+              }
+            },
+            'node_directions' => {
+              'prev' => {},
+              'up' => {}
+            },
+            'normalized' => 'chap'
+          }
+        }
+      },
+      'normalized' => 'Top'
+    }
+  },
+  {}
+];
+$result_nodes{'info_js_dir_html'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
 = $result_nodes{'info_js_dir_html'}[0];
+$result_nodes{'info_js_dir_html'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
 = $result_nodes{'info_js_dir_html'}[0];
+$result_nodes{'info_js_dir_html'}[1] = 
$result_nodes{'info_js_dir_html'}[0]{'extra'}{'node_directions'}{'next'};
+
+$result_menus{'info_js_dir_html'} = [
+  {
+    'extra' => {
+      'normalized' => 'Top'
+    }
+  },
+  {
+    'extra' => {
+      'normalized' => 'chap'
+    }
+  }
+];
+
+$result_errors{'info_js_dir_html'} = [];
+
+
+$result_floats{'info_js_dir_html'} = {};
+
+
+
+$result_converted{'html'}->{'info_js_dir_html'} = '<!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>
+
+<meta name="description" content="top">
+<meta name="keywords" content="top">
+<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">
+<div class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+Next: <a href="#chap" accesskey="n" rel="next">Chap</a> &nbsp; </p>
+</div>
+<h1 class="top" id="top"><span>top<a class="copiable-link" href="#top"> 
&para;</a></span></h1>
+                            
+<ul class="mini-toc">
+<li><a href="#chap" accesskey="1">Chap</a></li>
+</ul>
+<hr>
+<div class="chapter-level-extent" id="chap">
+<div class="nav-panel">
+<p>
+Previous: <a href="#Top" accesskey="p" rel="prev">top</a>, Up: <a href="#Top" 
accesskey="u" rel="up">top</a> &nbsp; </p>
+</div>
+<h2 class="chapter" id="Chap"><span>1 Chap<a class="copiable-link" 
href="#Chap"> &para;</a></span></h2>
+</div>
+</div>
+
+
+<a href="js_licenses.html" rel="jslicense"><small>JavaScript license 
information</small></a>
+</body>
+</html>
+';
+
+$result_converted_errors{'html'}->{'info_js_dir_html'} = [
+  {
+    'error_line' => 'INFO_JS_DIR not meaningful for non-split output
+',
+    'text' => 'INFO_JS_DIR not meaningful for non-split output',
+    'type' => 'error'
+  }
+];
+
+
+1;
diff --git a/tp/t/results/html_tests/info_js_dir_html_file.pl 
b/tp/t/results/html_tests/info_js_dir_html_file.pl
new file mode 100644
index 0000000000..825d5ca8d3
--- /dev/null
+++ b/tp/t/results/html_tests/info_js_dir_html_file.pl
@@ -0,0 +1,274 @@
+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 %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'info_js_dir_html_file'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'type' => 'preamble_before_content'
+        }
+      ],
+      'type' => 'before_node_section'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'is_target' => 1,
+        'normalized' => 'Top'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'top',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'extra' => {},
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 2,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chap'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'is_target' => 1,
+        'normalized' => 'chap'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 4,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Chapter'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'chapter',
+      'extra' => {
+        'section_number' => '1'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 5,
+        'macro' => ''
+      }
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'info_js_dir_html_file'} = '@node top
+@top top
+
+@node chap
+@chapter Chapter
+';
+
+
+$result_texts{'info_js_dir_html_file'} = 'top
+***
+
+1 Chapter
+*********
+';
+
+$result_sectioning{'info_js_dir_html_file'} = {
+  'extra' => {
+    'section_childs' => [
+      {
+        'cmdname' => 'top',
+        'extra' => {
+          'associated_node' => {
+            'cmdname' => 'node',
+            'extra' => {
+              'normalized' => 'Top'
+            }
+          },
+          'section_childs' => [
+            {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'associated_node' => {
+                  'cmdname' => 'node',
+                  'extra' => {
+                    'normalized' => 'chap'
+                  }
+                },
+                'section_directions' => {
+                  'up' => {}
+                },
+                'section_level' => 1,
+                'section_number' => '1',
+                'toplevel_directions' => {
+                  'prev' => {},
+                  'up' => {}
+                }
+              }
+            }
+          ],
+          'section_level' => 0,
+          'sectioning_root' => {},
+          'toplevel_directions' => {}
+        }
+      }
+    ],
+    'section_level' => -1
+  }
+};
+$result_sectioning{'info_js_dir_html_file'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
 = $result_sectioning{'info_js_dir_html_file'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'info_js_dir_html_file'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'prev'}
 = $result_sectioning{'info_js_dir_html_file'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'info_js_dir_html_file'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'up'}
 = $result_sectioning{'info_js_dir_html_file'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'info_js_dir_html_file'}{'extra'}{'section_childs'}[0]{'extra'}{'sectioning_root'}
 = $result_sectioning{'info_js_dir_html_file'};
+
+$result_nodes{'info_js_dir_html_file'} = [
+  {
+    'cmdname' => 'node',
+    'extra' => {
+      'associated_section' => {
+        'cmdname' => 'top',
+        'extra' => {}
+      },
+      'node_directions' => {
+        'next' => {
+          'cmdname' => 'node',
+          'extra' => {
+            'associated_section' => {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'section_number' => '1'
+              }
+            },
+            'node_directions' => {
+              'prev' => {},
+              'up' => {}
+            },
+            'normalized' => 'chap'
+          }
+        }
+      },
+      'normalized' => 'Top'
+    }
+  },
+  {}
+];
+$result_nodes{'info_js_dir_html_file'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
 = $result_nodes{'info_js_dir_html_file'}[0];
+$result_nodes{'info_js_dir_html_file'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
 = $result_nodes{'info_js_dir_html_file'}[0];
+$result_nodes{'info_js_dir_html_file'}[1] = 
$result_nodes{'info_js_dir_html_file'}[0]{'extra'}{'node_directions'}{'next'};
+
+$result_menus{'info_js_dir_html_file'} = [
+  {
+    'extra' => {
+      'normalized' => 'Top'
+    }
+  },
+  {
+    'extra' => {
+      'normalized' => 'chap'
+    }
+  }
+];
+
+$result_errors{'info_js_dir_html_file'} = [];
+
+
+$result_floats{'info_js_dir_html_file'} = {};
+
+
+1;
diff --git a/tp/t/results/html_tests/info_js_dir_html_file/res_html/chap.html 
b/tp/t/results/html_tests/info_js_dir_html_file/res_html/chap.html
new file mode 100644
index 0000000000..cd6485f9e7
--- /dev/null
+++ b/tp/t/results/html_tests/info_js_dir_html_file/res_html/chap.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 (top)</title>
+
+<meta name="description" content="chap (top)">
+<meta name="keywords" content="chap (top)">
+<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="index.html" rel="up" title="top">
+<link href="index.html" rel="prev" 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>
+
+<link rel="stylesheet" type="text/css" href="js/info.css">
+<script src="js/modernizr.js" type="text/javascript"></script>
+<script src="js/info.js" type="text/javascript"></script>
+</head>
+
+<body lang="en">
+<div class="chapter-level-extent" id="chap">
+<div class="nav-panel">
+<p>
+Previous: <a href="index.html" accesskey="p" rel="prev">top</a>, Up: <a 
href="index.html" accesskey="u" rel="up">top</a> &nbsp; </p>
+</div>
+<hr>
+<h2 class="chapter" id="Chapter"><span>1 Chapter<a class="copiable-link" 
href="#Chapter"> &para;</a></span></h2>
+</div>
+
+
+<a href="js_licenses.html" rel="jslicense"><small>JavaScript license 
information</small></a>
+</body>
+</html>
diff --git a/tp/t/results/html_tests/info_js_dir_html_file/res_html/index.html 
b/tp/t/results/html_tests/info_js_dir_html_file/res_html/index.html
new file mode 100644
index 0000000000..b9f89d41d9
--- /dev/null
+++ b/tp/t/results/html_tests/info_js_dir_html_file/res_html/index.html
@@ -0,0 +1,50 @@
+<!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>
+
+<meta name="description" content="top">
+<meta name="keywords" content="top">
+<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.html" rel="next" title="chap">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+span:hover a.copiable-link {visibility: visible}
+-->
+</style>
+
+<link rel="stylesheet" type="text/css" href="js/info.css">
+<script src="js/modernizr.js" type="text/javascript"></script>
+<script src="js/info.js" type="text/javascript"></script>
+</head>
+
+<body lang="en">
+<div class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+Next: <a href="chap.html" accesskey="n" rel="next">Chapter</a> &nbsp; </p>
+</div>
+<hr>
+<h1 class="top" id="top"><span>top<a class="copiable-link" href="#top"> 
&para;</a></span></h1>
+
+<ul class="mini-toc">
+<li><a href="chap.html" accesskey="1">Chapter</a></li>
+</ul>
+</div>
+<hr>
+<div class="nav-panel">
+<p>
+Next: <a href="chap.html" accesskey="n" rel="next">Chapter</a> &nbsp; </p>
+</div>
+
+
+<a href="js_licenses.html" rel="jslicense"><small>JavaScript license 
information</small></a>
+</body>
+</html>
diff --git a/tp/t/results/html_tests/info_js_dir_html_file/res_html/js/info.css 
b/tp/t/results/html_tests/info_js_dir_html_file/res_html/js/info.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tp/t/results/html_tests/info_js_dir_html_file/res_html/js/info.js 
b/tp/t/results/html_tests/info_js_dir_html_file/res_html/js/info.js
new file mode 100644
index 0000000000..e69de29bb2
diff --git 
a/tp/t/results/html_tests/info_js_dir_html_file/res_html/js/modernizr.js 
b/tp/t/results/html_tests/info_js_dir_html_file/res_html/js/modernizr.js
new file mode 100644
index 0000000000..e69de29bb2
diff --git 
a/tp/t/results/html_tests/info_js_dir_html_file/res_html/js_licenses.html 
b/tp/t/results/html_tests/info_js_dir_html_file/res_html/js_licenses.html
new file mode 100644
index 0000000000..ba8195f345
--- /dev/null
+++ b/tp/t/results/html_tests/info_js_dir_html_file/res_html/js_licenses.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html><head><title>jslicense labels</title></head>
+<body>
+<table id="jslicense-labels1">
+<tr>
+<td><a href="js/info.js">js/info.js</a></td>
+<td><a href="http://www.gnu.org/licenses/gpl-3.0.html";>GNU General Public 
License 3.0 or later</a></td>
+<td><a href="js/info.js">js/info.js</a></td>
+</tr>
+<tr>
+<td><a href="js/modernizr.js">js/modernizr.js</a></td>
+<td><a href="http://www.jclark.com/xml/copying.txt";>Expat</a></td>
+<td><a href="js/modernizr.js">js/modernizr.js</a></td>
+</tr>
+</table>
+</body></html>
diff --git a/tp/t/results/html_tests/info_js_dir_html_text.pl 
b/tp/t/results/html_tests/info_js_dir_html_text.pl
new file mode 100644
index 0000000000..97f12e011a
--- /dev/null
+++ b/tp/t/results/html_tests/info_js_dir_html_text.pl
@@ -0,0 +1,287 @@
+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 %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'info_js_dir_html_text'} = {
+  'contents' => [
+    {
+      'type' => 'before_node_section'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'is_target' => 1,
+        'normalized' => 'Top'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'top',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'extra' => {},
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 2,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chap'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'is_target' => 1,
+        'normalized' => 'chap'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 4,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Chapter'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'chapter',
+      'extra' => {
+        'section_number' => '1'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 5,
+        'macro' => ''
+      }
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'info_js_dir_html_text'} = '@node top
+@top top
+
+@node chap
+@chapter Chapter
+';
+
+
+$result_texts{'info_js_dir_html_text'} = 'top
+***
+
+1 Chapter
+*********
+';
+
+$result_sectioning{'info_js_dir_html_text'} = {
+  'extra' => {
+    'section_childs' => [
+      {
+        'cmdname' => 'top',
+        'extra' => {
+          'associated_node' => {
+            'cmdname' => 'node',
+            'extra' => {
+              'normalized' => 'Top'
+            }
+          },
+          'section_childs' => [
+            {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'associated_node' => {
+                  'cmdname' => 'node',
+                  'extra' => {
+                    'normalized' => 'chap'
+                  }
+                },
+                'section_directions' => {
+                  'up' => {}
+                },
+                'section_level' => 1,
+                'section_number' => '1',
+                'toplevel_directions' => {
+                  'prev' => {},
+                  'up' => {}
+                }
+              }
+            }
+          ],
+          'section_level' => 0,
+          'sectioning_root' => {},
+          'toplevel_directions' => {}
+        }
+      }
+    ],
+    'section_level' => -1
+  }
+};
+$result_sectioning{'info_js_dir_html_text'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
 = $result_sectioning{'info_js_dir_html_text'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'info_js_dir_html_text'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'prev'}
 = $result_sectioning{'info_js_dir_html_text'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'info_js_dir_html_text'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'up'}
 = $result_sectioning{'info_js_dir_html_text'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'info_js_dir_html_text'}{'extra'}{'section_childs'}[0]{'extra'}{'sectioning_root'}
 = $result_sectioning{'info_js_dir_html_text'};
+
+$result_nodes{'info_js_dir_html_text'} = [
+  {
+    'cmdname' => 'node',
+    'extra' => {
+      'associated_section' => {
+        'cmdname' => 'top',
+        'extra' => {}
+      },
+      'node_directions' => {
+        'next' => {
+          'cmdname' => 'node',
+          'extra' => {
+            'associated_section' => {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'section_number' => '1'
+              }
+            },
+            'node_directions' => {
+              'prev' => {},
+              'up' => {}
+            },
+            'normalized' => 'chap'
+          }
+        }
+      },
+      'normalized' => 'Top'
+    }
+  },
+  {}
+];
+$result_nodes{'info_js_dir_html_text'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
 = $result_nodes{'info_js_dir_html_text'}[0];
+$result_nodes{'info_js_dir_html_text'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
 = $result_nodes{'info_js_dir_html_text'}[0];
+$result_nodes{'info_js_dir_html_text'}[1] = 
$result_nodes{'info_js_dir_html_text'}[0]{'extra'}{'node_directions'}{'next'};
+
+$result_menus{'info_js_dir_html_text'} = [
+  {
+    'extra' => {
+      'normalized' => 'Top'
+    }
+  },
+  {
+    'extra' => {
+      'normalized' => 'chap'
+    }
+  }
+];
+
+$result_errors{'info_js_dir_html_text'} = [];
+
+
+$result_floats{'info_js_dir_html_text'} = {};
+
+
+
+$result_converted{'html_text'}->{'info_js_dir_html_text'} = '<div 
class="top-level-extent" id="Top">
+<div class="nav-panel">
+</div>
+<h1 class="top" id="top"><span>top<a class="copiable-link" href="#top"> 
&para;</a></span></h1>
+
+<ul class="mini-toc">
+<li><a href="#chap" accesskey="1">Chapter</a></li>
+</ul>
+<hr>
+<div class="chapter-level-extent" id="chap">
+<div class="nav-panel">
+</div>
+<h2 class="chapter" id="Chapter"><span>1 Chapter<a class="copiable-link" 
href="#Chapter"> &para;</a></span></h2>
+</div>
+</div>
+';
+
+1;
diff --git a/tp/t/results/html_tests/mathjax_with_texinfo_html_file.pl 
b/tp/t/results/html_tests/mathjax_with_texinfo_html_file.pl
new file mode 100644
index 0000000000..dd9ae5ba7f
--- /dev/null
+++ b/tp/t/results/html_tests/mathjax_with_texinfo_html_file.pl
@@ -0,0 +1,294 @@
+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 %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'mathjax_with_texinfo_html_file'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'type' => 'preamble_before_content'
+        },
+        {
+          'args' => [
+            {
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'displaymath',
+          'contents' => [
+            {
+              'text' => 'a'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'b - \\frac'
+                    },
+                    {
+                      'contents' => [
+                        {
+                          'text' => '{\\xi}'
+                        }
+                      ],
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 2,
+                        'macro' => ''
+                      },
+                      'type' => 'balanced_braces'
+                    },
+                    {
+                      'contents' => [
+                        {
+                          'text' => '{phi '
+                        },
+                        {
+                          'args' => [
+                            {
+                              'type' => 'brace_command_arg'
+                            }
+                          ],
+                          'cmdname' => 'copyright',
+                          'source_info' => {
+                            'file_name' => '',
+                            'line_nr' => 2,
+                            'macro' => ''
+                          }
+                        },
+                        {
+                          'text' => '}'
+                        }
+                      ],
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 2,
+                        'macro' => ''
+                      },
+                      'type' => 'balanced_braces'
+                    }
+                  ],
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'sup',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 2,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => ' '
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'i'
+                    }
+                  ],
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'dotless',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 2,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => '
+'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'displaymath'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'displaymath'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 3,
+                'macro' => ''
+              }
+            }
+          ],
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 1,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'Some '
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'a '
+                    },
+                    {
+                      'args' => [
+                        {
+                          'type' => 'brace_command_arg'
+                        }
+                      ],
+                      'cmdname' => 'minus',
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 5,
+                        'macro' => ''
+                      }
+                    },
+                    {
+                      'text' => ' b '
+                    },
+                    {
+                      'args' => [
+                        {
+                          'type' => 'brace_command_arg'
+                        }
+                      ],
+                      'cmdname' => 'geq',
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 5,
+                        'macro' => ''
+                      }
+                    },
+                    {
+                      'text' => ' '
+                    },
+                    {
+                      'args' => [
+                        {
+                          'type' => 'brace_command_arg'
+                        }
+                      ],
+                      'cmdname' => 'AA',
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 5,
+                        'macro' => ''
+                      }
+                    },
+                    {
+                      'text' => ' '
+                    },
+                    {
+                      'args' => [
+                        {
+                          'contents' => [
+                            {
+                              'text' => 'e'
+                            }
+                          ],
+                          'type' => 'following_arg'
+                        }
+                      ],
+                      'cmdname' => '^',
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 5,
+                        'macro' => ''
+                      }
+                    }
+                  ],
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'math',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 5,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => '.
+'
+            }
+          ],
+          'type' => 'paragraph'
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+
+$result_texis{'mathjax_with_texinfo_html_file'} = '@displaymath
+a@sup{b - \\frac{\\xi}{phi @copyright{}}} @dotless{i}
+@end displaymath
+
+Some @math{a @minus{} b @geq{} @AA{} @^e}.
+';
+
+
+$result_texts{'mathjax_with_texinfo_html_file'} = 'ab - \\frac{\\xi}{phi (C)} i
+
+Some a - b >= AA e^.
+';
+
+$result_errors{'mathjax_with_texinfo_html_file'} = [];
+
+
+$result_floats{'mathjax_with_texinfo_html_file'} = {};
+
+
+$result_converted_errors{'file_html'}->{'mathjax_with_texinfo_html_file'} = [
+  {
+    'error_line' => 'warning: must specify a title with a title command or @top
+',
+    'file_name' => 'mathjax_with_texinfo_html_file.texi',
+    'text' => 'must specify a title with a title command or @top',
+    'type' => 'warning'
+  }
+];
+
+
+1;
diff --git 
a/tp/t/results/html_tests/mathjax_with_texinfo_html_file/res_html/index.html 
b/tp/t/results/html_tests/mathjax_with_texinfo_html_file/res_html/index.html
new file mode 100644
index 0000000000..f8ba95345a
--- /dev/null
+++ b/tp/t/results/html_tests/mathjax_with_texinfo_html_file/res_html/index.html
@@ -0,0 +1,36 @@
+<!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>Untitled Document</title>
+
+<meta name="description" content="Untitled Document">
+<meta name="keywords" content="Untitled Document">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+
+<script type='text/javascript'>
+MathJax = {
+  options: {
+    skipHtmlTags: {'[-]': ['pre']},
+    ignoreHtmlClass: 'tex2jax_ignore',
+    processHtmlClass: 'tex2jax_process'
+  },
+};
+</script><script type="text/javascript" id="MathJax-script" async
+  src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js";>
+</script>
+</head>
+
+<body lang="en" class="tex2jax_ignore">
+<div class="displaymath"><em class="tex2jax_process">\[a^{b - \frac{\xi}{phi 
\copyright{}}} \imath{}
+\]</em></div>
+<p>Some <em class="math tex2jax_process">\(a - b \geq{} \mathord{\text{\AA{}}} 
\hat{e}\)</em>.
+</p>
+
+<a href="js_licenses.html" rel="jslicense"><small>JavaScript license 
information</small></a>
+</body>
+</html>
diff --git 
a/tp/t/results/html_tests/mathjax_with_texinfo_html_file/res_html/js_licenses.html
 
b/tp/t/results/html_tests/mathjax_with_texinfo_html_file/res_html/js_licenses.html
new file mode 100644
index 0000000000..6933c53297
--- /dev/null
+++ 
b/tp/t/results/html_tests/mathjax_with_texinfo_html_file/res_html/js_licenses.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html><head><title>jslicense labels</title></head>
+<body>
+<table id="jslicense-labels1">
+<tr>
+<td><a 
href="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js";>https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js</a></td>
+<td><a href="https://www.apache.org/licenses/LICENSE-2.0";>Apache License, 
Version 2.0.</a></td>
+<td><a 
href="http://docs.mathjax.org/en/latest/web/hosting.html#getting-mathjax-via-git";>http://docs.mathjax.org/en/latest/web/hosting.html#getting-mathjax-via-git</a></td>
+</tr>
+</table>
+</body></html>
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 2e8db1158a..f1fd7f9112 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -217,6 +217,9 @@ sub protect_perl_string($)
   return $string;
 }
 
+# not that subdirectories are not compared, so subdirectories generated
+# by INFO_JS_DIR, if different, will not trigger an error in test, but
+# will lead to different directories and files for diffs..
 sub compare_dirs_files($$;$)
 {
   my $dir1 = shift;



reply via email to

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