[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/t/test_utils.pl (test): call rebuild_output_
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/t/test_utils.pl (test): call rebuild_output_units unconditionally if $test_split or $split_pages is set. Add a comment explaining why the current code works, because there is no XS override and rebuild_output_units returns its output, and that if an XS override is set up there should be overrides for all the functions. |
Date: |
Tue, 24 Oct 2023 19:20:51 -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 4bdd1db56c * tp/t/test_utils.pl (test): call rebuild_output_units
unconditionally if $test_split or $split_pages is set. Add a comment
explaining why the current code works, because there is no XS override and
rebuild_output_units returns its output, and that if an XS override is set up
there should be overrides for all the functions.
4bdd1db56c is described below
commit 4bdd1db56cb6e1a19f5efc9210072e5d5b7c34ec
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Oct 25 01:20:52 2023 +0200
* tp/t/test_utils.pl (test): call rebuild_output_units unconditionally
if $test_split or $split_pages is set. Add a comment explaining why
the current code works, because there is no XS override and
rebuild_output_units returns its output, and that if an XS override is
set up there should be overrides for all the functions.
---
ChangeLog | 8 ++++++++
tp/t/test_utils.pl | 19 +++++++++++--------
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 07da74b8f5..386bc7a673 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-10-24 Patrice Dumas <pertusus@free.fr>
+
+ * tp/t/test_utils.pl (test): call rebuild_output_units unconditionally
+ if $test_split or $split_pages is set. Add a comment explaining why
+ the current code works, because there is no XS override and
+ rebuild_output_units returns its output, and that if an XS override is
+ set up there should be overrides for all the functions.
+
2023-10-24 Patrice Dumas <pertusus@free.fr>
* tp/t/test_utils.pl (convert_to_html): use only strings for SPLIT.
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 736464f637..c16007951d 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -1298,6 +1298,14 @@ sub test($$)
my $unsplit_needed = Texinfo::Structuring::unsplit($tree);
print STDERR " UNSPLIT: $test_name\n"
if ($self->{'DEBUG'} and $unsplit_needed);
+
+ # There is no XS overriding for the following codes. rebuild_output_units
+ # returns the input output units if there is no XS structures, which allows
+ # to have tests passing when XS is used (in the default case). If overriding
+ # of XS is setup, most likely all the functions should have an XS override
+ # (units_directions has not, though there is an implementation in C),
+ # otherwise some information will be missing in the rebuild_output_units
+ # output.
my $output_units;
if ($test_split eq 'node') {
$output_units = Texinfo::Structuring::split_by_node($tree);
@@ -1319,14 +1327,9 @@ sub test($$)
Texinfo::Structuring::split_pages($output_units, $split_pages);
}
- if ($test_split) {
- # not sure that the conditions are needed, in case of error
- # the input is returned.
- if (defined $ENV{TEXINFO_XS_CONVERT}
- and $ENV{TEXINFO_XS_CONVERT} eq '1') {
- $output_units
- = Texinfo::Structuring::rebuild_output_units($output_units);
- }
+ if ($test_split or $split_pages) {
+ $output_units
+ = Texinfo::Structuring::rebuild_output_units($output_units);
}
my $file = "t/results/$self->{'name'}/$test_name.pl";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/t/test_utils.pl (test): call rebuild_output_units unconditionally if $test_split or $split_pages is set. Add a comment explaining why the current code works, because there is no XS override and rebuild_output_units returns its output, and that if an XS override is set up there should be overrides for all the functions.,
Patrice Dumas <=