@@ -13,8 +13,8 @@ by the following special line
13
13
__DATA__
14
14
....
15
15
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
18
18
after this line is treated as *data* in plain text that is reachable
19
19
by the Perl code above this line. The most interesting part of each `.t`
20
20
test file is the stuff after this line, i.e., the data part.
@@ -43,7 +43,7 @@ run_tests();
43
43
The first line is just loading the Perl module (or class), `Test::Nginx::Socket`
44
44
and passing the option `'no_plan'` to it to disable test plans (we will
45
45
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
47
47
in the `Test::Nginx` test framework. The second line just calls the `run_tests`
48
48
Perl function imported automatically from the `Test::Nginx::Socket` module
49
49
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
70
70
languages to present the tests themselves. This special specification format
71
71
is an instance of Domain-Specific Languages (DSL) where the "domain" is
72
72
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
74
74
of code. This is also why `Test::Nginx` is a data-driven testing framework.
75
75
76
76
The test case specification in the data part is composed by a series of
96
96
==== Block Titles
97
97
98
98
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
100
100
beginning of the line. The title is mandatory and is important to describe
101
101
the intention of the current test case in the most concise form, and also
102
102
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
214
214
any expected test failures. We will visit more such "control sections"
215
215
in later sections.
216
216
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.
220
220
221
221
==== Section Filters
222
222
@@ -257,9 +257,9 @@ exclude the trailing new-line in the multi-line form, we can employ the
257
257
258
258
Now it has exactly the same semantics as the previous one-line form.
259
259
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,
261
261
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
263
263
value. The following section demonstrates using the `eval` filter to produce
264
264
4096 a's:
265
265
@@ -279,7 +279,7 @@ obvious that use of the `eval` filter and a Perl expression here is much
279
279
more readable and manageable than directly pasting that 4096-byte string
280
280
in the test block.
281
281
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
283
283
shall see in a later section.
284
284
285
285
=== A Complete Example
0 commit comments