@@ -41,22 +41,25 @@ C<subtest>'s L«C<Callable>|/type/Callable». For that reason, to be able to
41
41
use C < :skip-all > inside a C < subtest > , you must use a C < sub > instead of a
42
42
regular block:
43
43
44
- plan 2;
45
- subtest "Some Windows tests" => sub { # <-- note the `sub`; can't use bare block
46
- plan :skip-all<We aren't on Windows> unless $*DISTRO.is-win;
47
- plan 1;
48
- ok dir 'C:/'; # this won't get run on non-Windows
49
- }
50
- ok 42; # this will run everywhere and isn't affected by skip-all inside subtest
44
+ = begin code
45
+ plan 2;
46
+ subtest "Some Windows tests" => sub { # <-- note the `sub`; can't use bare block
47
+ plan :skip-all<We aren't on Windows> unless $*DISTRO.is-win;
48
+ plan 1;
49
+ ok dir 'C:/'; # this won't get run on non-Windows
50
+ }
51
+ ok 42; # this will run everywhere and isn't affected by skip-all inside subtest
52
+ = end code
51
53
52
- Note that C < plan > with C < :skip-all > is to avoid performing any tests without marking the
53
- test run as failed (i.e. the plan is to not run anything and that's all good). Use
54
- L « C < skip-rest > |/language/testing#index-entry-skip-rest-skip-rest($reason?)» to skip
55
- all further tests, once the run has started (i.e. planned to run some tests, maybe
56
- even ran some, but now we're skipping all the rest of them). Use
57
- L « C < bail-out > |/language/testing#index-entry-bail-out-bail-out($reason?)» to fail the
58
- test run without running any further tests (i.e. things are so bad, there's no point
59
- in running anything else; we've failed).
54
+ Note that C < plan > with C < :skip-all > is to avoid performing any tests without
55
+ marking the test run as failed (i.e. the plan is to not run anything and that's
56
+ all good). Use
57
+ L « C < skip-rest > |/language/testing#index-entry-skip-rest-skip-rest($reason?)» to
58
+ skip all further tests, once the run has started (i.e. planned to run some
59
+ tests, maybe even ran some, but now we're skipping all the rest of them). Use
60
+ L « C < bail-out > |/language/testing#index-entry-bail-out-bail-out($reason?)» to fail
61
+ the test run without running any further tests (i.e. things are so bad, there's
62
+ no point in running anything else; we've failed).
60
63
61
64
= head2 sub done-testing
62
65
@@ -167,8 +170,9 @@ B<Note:> if I<only> whitespace differs between the values, C<is()> will output f
167
170
message differently, to show the whitespace in each values. For example, in the
168
171
output below, the second test shows the literal C < \t > in the C < got: > line:
169
172
170
- is "foo\tbar", "foo\tbaz"; # expected: 'foo baz'# got: 'foo bar'
171
- is "foo\tbar", "foo bar"; # expected: "foo bar"# got: "foo\tbar"
173
+ = for code
174
+ is "foo\tbar", "foo\tbaz"; # expected: 'foo baz'# got: 'foo bar'
175
+ is "foo\tbar", "foo bar"; # expected: "foo bar"# got: "foo\tbar"
172
176
173
177
= head2 sub isnt
174
178
@@ -193,7 +197,9 @@ Defined as:
193
197
194
198
multi sub is-approx(Numeric $got, Numeric $expected, $desc = '')
195
199
196
- multi sub is-approx(Numeric $got, Numeric $expected, Numeric $abs-tol,$desc = '')
200
+ = for code :method
201
+ multi sub is-approx(Numeric $got, Numeric $expected, Numeric $abs-tol,
202
+ $desc = '')
197
203
198
204
= for code :method
199
205
multi sub is-approx(Numeric $got, Numeric $expected, $desc = '',
0 commit comments