summaryrefslogtreecommitdiff
path: root/ext/Pod-Html
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2022-11-25 21:53:30 +0000
committerJames E Keenan <jkeenan@cpan.org>2022-11-28 22:37:53 +0000
commit4d597d86ca65c369680ced9b942edbde4a6ec0a7 (patch)
treeac48c21607298d2eda75af82a2d5fd1a93923134 /ext/Pod-Html
parentbcbede66ea9b2d1ecf2388cdeaa9690250ef7aee (diff)
downloadperl-4d597d86ca65c369680ced9b942edbde4a6ec0a7.tar.gz
Testing.pm: minor grammatical corrections and docs tidying
Diffstat (limited to 'ext/Pod-Html')
-rw-r--r--ext/Pod-Html/t/lib/Testing.pm33
1 files changed, 20 insertions, 13 deletions
diff --git a/ext/Pod-Html/t/lib/Testing.pm b/ext/Pod-Html/t/lib/Testing.pm
index 5baf0bb3f5..61b9324345 100644
--- a/ext/Pod-Html/t/lib/Testing.pm
+++ b/ext/Pod-Html/t/lib/Testing.pm
@@ -121,7 +121,7 @@ underlying operating system, I<e.g.,> with respect to path separators. Hence,
we cannot hard-code the expected HTML output into the C<DATA> template or any
place else. We have to allow C<Pod::Html::pod2html()> to massage the template
data to get an "expected output" against which we match the "actual output"
-which come from running C<Pod::Html::pod2html()> over the text originally
+which comes from running C<Pod::Html::pod2html()> over the text originally
slurped into memory from the F<t/*.pod> file.
Granted, there is a certain amount of circularity in this testing regimen. On
@@ -139,7 +139,8 @@ that we get consistent results out of C<pod2html()> year after year.
Here we continue to focus on those test programs which make use of the testing
functions exported by F<Testing> and which take a F<t/*.pod> file as input.
-We assume that we begin our tests from the top level of the Perl 5 core distribution and are using F<t/harness>. Hence, to run the test files we say:
+We assume that we begin our tests from the top level of the Perl 5 core
+distribution and are using F<t/harness>. Hence, to run the test files we say:
cd t; ./perl harness ../ext/Pod-Html/t/*.t; cd -
@@ -147,15 +148,15 @@ The program then slurps contents of the C<DATA> handle into memory.
The program then calls C<setup_testing_dir()> from this module to create a
temporary directory and populate it as needed. C<setup_testing_dir()> returns
-the absolute path to that directory, but at the point of return you are
-actually located two levels beneath the temporary directory in a directory whose relative path is
-F<ext/Pod-Html/>. (This is equivalent to being in F<toplevel/ext/Pod-Html/>
-for tests in versions of Pod-Html distributed with earlier versions of
-F<perl>.)
+the absolute path to that directory, but at the point where that subroutine
+returns you are actually located two levels beneath the temporary directory in
+a directory whose relative path is F<ext/Pod-Html/>. (This is equivalent to
+being in F<toplevel/ext/Pod-Html/> for tests in versions of Pod-Html
+distributed with earlier versions of F<perl>.)
-Note that this means that at the end of the program you will have to
-switch back to your starting directory so that the tempdir can automatically
-be cleaned up. We automate this via an C<END> block.
+Note that this means that at the end of the program you will have to switch
+back to your starting directory so that the tempdir can automatically be
+cleaned up. We automate this via an C<END> block.
You then prepare arguments for our principal testing function, C<xconvert()>
(which supersedes the former C<convert_n_test()>. These arguments take the
@@ -433,10 +434,16 @@ Not explicitly defined, but should return a Perl-true value upon completion.
=item * Comment
-This function essentially asks, "Are we getting the same HTML output the last time we tinkered with the code in this distribution?" Hence, it is dependent on the particular parsing and HTML composition functionality found within C<Pod::Html::pod2html()>, which is a somewhat customized subclass of F<Pod::Simple::XHTML>. If, in the future, we offer functionality based on other parsing classes, then the C<DATA> sections of the F<t/*.t> files will have to be revised and perhaps the guts of C<xconvert()> as well.
+This function essentially asks, "Are we getting the same HTML output the last
+time we tinkered with the code in this distribution?" Hence, it is dependent
+on the particular parsing and HTML composition functionality found within
+C<Pod::Html::pod2html()>, which is a somewhat customized subclass of
+F<Pod::Simple::XHTML>. If, in the future, we offer functionality based on
+other parsing classes, then the C<DATA> sections of the F<t/*.t> files will
+have to be revised and perhaps the guts of C<xconvert()> as well.
-This function is roughly equivalent to test helper function C<convert_n_test()> in earlier
-versions of Pod-Html.
+This function is roughly equivalent to test helper function
+C<convert_n_test()> in earlier versions of Pod-Html.
=back