Here is one issue that I had a note of to look at after the
Texinfo 7.3 release.
There are some tests that are skipped conditionally based on whether
there is XS conversion.
"t/html_tests.t spaces_in_line_break_in_verb_w" was one:
['spaces_in_line_break_in_verb_w',
'@w{aaa bb
ccc}
@verb{|aaa bb
ccc|}
', {'init_files' => ['spaces_in_line_breaks.init'],
'skip' => $XS_convert ? 'Direct perl data change test' : undef,},
],
$XS_convert is checked in quite a few places in the test suite:
$ grep XS_convert . -R --include="*.t"
./converters_tests.t:my $XS_convert = Texinfo::XSLoader::XS_convert_enabled();
./converters_tests.t: {'skip' => $XS_convert ? 'Non reproducible
transliteration' : undef,},
./30sectioning.t:my $XS_convert = Texinfo::XSLoader::XS_convert_enabled();
./30sectioning.t: 'skip' => ($] < 5.014 or $XS_convert) ?
./30sectioning.t: 'skip' => ($] < 5.014 or $XS_convert) ?
./30sectioning.t: 'skip' => $XS_convert ? 'Non reproducible transliteration'
: undef,},
./z_misc/test_protect_hashchar_at_line_beginning.t:my $XS_convert =
Texinfo::XSLoader::XS_convert_enabled();
./z_misc/test_protect_hashchar_at_line_beginning.t: # use a handler only if
everything is in XS, with XS_convert set
./z_misc/test_protect_hashchar_at_line_beginning.t: my $corrected_tree =
$document->tree($XS_convert);
./40moresectioning.t:my $XS_convert = Texinfo::XSLoader::XS_convert_enabled();
./40moresectioning.t: 'skip' => ($] < 5.018 or $XS_convert) ?
./formats_encodings.t:my $XS_convert = Texinfo::XSLoader::XS_convert_enabled();
./formats_encodings.t: 'skip' => $XS_convert ? 'Non reproducible
transliteration' : undef,},
./formats_encodings.t: 'skip' => $XS_convert ? 'Non reproducible
transliteration' : undef,},
./formats_encodings.t: 'skip' => $XS_convert ? 'Non reproducible
transliteration' : undef,},
./formats_encodings.t: 'skip' => $XS_convert ? 'Non reproducible
transliteration' : undef,},
./formats_encodings.t: 'skip' => $XS_convert ? 'Non reproducible
transliteration' : undef,},
./formats_encodings.t: 'skip' => $XS_convert ? 'Non reproducible
transliteration' : undef,},
./html_tests.t:my $XS_convert = Texinfo::XSLoader::XS_convert_enabled();
./html_tests.t: 'skip' => $XS_convert ? 'Direct perl data change test' :
undef,},
./html_tests.t: 'skip' => $XS_convert ? 'Non reproducible transliteration' :
undef,},
./html_tests.t: 'skip' => $XS_convert ? 'Non reproducible transliteration' :
undef,},
./html_tests.t: 'skip' => $XS_convert ? 'Non reproducible transliteration' :
undef,},
./html_tests.t: 'skip' => $XS_convert ? 'Non reproducible transliteration' :
undef,},
./html_tests.t: 'skip' => ($] < 5.014 or $XS_convert) ?
./epub_tests.t:my $XS_convert = Texinfo::XSLoader::XS_convert_enabled();
This caused a problem at one point when I was updating the test results. The
condition wasn't met and the test wasn't updated, and then the test
suite failed under different conditions. (I can't remember the exact
circumstances and it was possible that it was the other way around, that
I updated the test results with XS enabled, and then the tests failed with
pure Perl, although I don't believe that would have happened as the test
should have been skipped under pure Perl.)
So tests that are only run under certain conditions cause a problem with
updating the results. Hence if we are to have conditional tests the tests
should be enabled under "normal" circumstances. For example, if we have
tests that require XS conversion, then the results should only be updated
if XS conversion is enabled.
I remember we agreed that the variables like TEXINFO_XS_CONVERT were going to
go away, so as a preliminary step I am going to try to remove these and replace
them with a single variable (TEXINFO_XS).