Skip to content

Commit 80dc98a

Browse files
nicholaschiassonagentzh
authored andcommitted
More wording and grammar fixes.
1 parent 136ecad commit 80dc98a

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Diff for: testing/test-file-layout.adoc

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ by the following special line
1313
__DATA__
1414
....
1515

16-
The `perl` interpreter or the `prove` utility stop interpreting the file
17-
content as Perl source code until they see this special line. Everything
16+
The `perl` interpreter or the `prove` utility stops interpreting the file
17+
content as Perl source code once they see this special line. Everything
1818
after this line is treated as *data* in plain text that is reachable
1919
by the Perl code above this line. The most interesting part of each `.t`
2020
test file is the stuff after this line, i.e., the data part.
@@ -43,7 +43,7 @@ run_tests();
4343
The first line is just loading the Perl module (or class), `Test::Nginx::Socket`
4444
and passing the option `'no_plan'` to it to disable test plans (we will
4545
talk more about test plans in later chapters and we do not bother worrying
46-
about it here). `Test::Nginx::Socket` is one of the most popular class
46+
about it here). `Test::Nginx::Socket` is one of the most popular classes
4747
in the `Test::Nginx` test framework. The second line just calls the `run_tests`
4848
Perl function imported automatically from the `Test::Nginx::Socket` module
4949
to run all the test cases defined in the data part of the test file (i.e.,
@@ -70,7 +70,7 @@ to express test cases so that the user does not use Perl or any other general-pu
7070
languages to present the tests themselves. This special specification format
7171
is an instance of Domain-Specific Languages (DSL) where the "domain" is
7272
defined as testing code running upon or inside NGINX. Use of a DSL to present
73-
test cases open the door of presenting the test cases as _data_ instead
73+
test cases opens the door for presenting the test cases as _data_ instead
7474
of code. This is also why `Test::Nginx` is a data-driven testing framework.
7575

7676
The test case specification in the data part is composed by a series of
@@ -96,7 +96,7 @@ value3
9696
==== Block Titles
9797

9898
As we can see, each test block starts with a title line prefixed by three
99-
equal sign (`===`). It is important to _avoid_ any leading spaces at the
99+
equal signs (`===`). It is important to _avoid_ any leading spaces at the
100100
beginning of the line. The title is mandatory and is important to describe
101101
the intention of the current test case in the most concise form, and also
102102
to identify the test block in the test report when test failures happen.
@@ -214,9 +214,9 @@ handy for preparing test cases for future features without introducing
214214
any expected test failures. We will visit more such "control sections"
215215
in later sections.
216216

217-
We shall see, in a later section, that the user can define her own data
218-
sections or extending existing ones by writing a little bit of custom Perl
219-
code to satisfy her more complicated testing requirements.
217+
We shall see, in a later section, that the user can define their own data
218+
sections or extend existing ones by writing a little bit of custom Perl
219+
code to satisfy more complicated testing requirements.
220220

221221
==== Section Filters
222222

@@ -257,9 +257,9 @@ exclude the trailing new-line in the multi-line form, we can employ the
257257

258258
Now it has exactly the same semantics as the previous one-line form.
259259

260-
Some filters have more dramatic effect on the section values. For instance,
260+
Some filters have a more dramatic effect on the section values. For instance,
261261
the `eval` filter evaluates the section value as arbitrary Perl code, and
262-
the Perl value resulted from the execution will be used as the final section
262+
the Perl value resulting from the execution will be used as the final section
263263
value. The following section demonstrates using the `eval` filter to produce
264264
4096 a's:
265265

@@ -279,7 +279,7 @@ obvious that use of the `eval` filter and a Perl expression here is much
279279
more readable and manageable than directly pasting that 4096-byte string
280280
in the test block.
281281

282-
As with data sections, the user can also define her own filters, as we
282+
As with data sections, the user can also define their own filters, as we
283283
shall see in a later section.
284284

285285
=== A Complete Example

Diff for: testing/test-suite-layout.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Although `.t` files are Perl scripts per se, they usually do not have much
4444
Perl code at all. Instead, all of the test cases are declared as cleanly
4545
formatted "data" in these `.t` files.
4646

47-
NOTE: The test suite layout convention we use here are also used by the
47+
NOTE: The test suite layout convention we use here has also been used by the
4848
Perl community for many years. Because `Test::Nginx` is written in Perl
4949
and reuses Perl's testing toolchain, it makes sense for us to simply follow
5050
that convention in the NGINX and OpenResty world as well.

0 commit comments

Comments
 (0)