Skip to content

Commit cff272d

Browse files
committed
Reindent to test shippable refs #2489
1 parent c854f4d commit cff272d

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

doc/Type/Test.pod6

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,25 @@ C<subtest>'s L«C<Callable>|/type/Callable». For that reason, to be able to
4141
use C<:skip-all> inside a C<subtest>, you must use a C<sub> instead of a
4242
regular block:
4343
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
5153
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).
6063
6164
=head2 sub done-testing
6265
@@ -167,8 +170,9 @@ B<Note:> if I<only> whitespace differs between the values, C<is()> will output f
167170
message differently, to show the whitespace in each values. For example, in the
168171
output below, the second test shows the literal C<\t> in the C<got:> line:
169172
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"
172176
173177
=head2 sub isnt
174178
@@ -193,7 +197,9 @@ Defined as:
193197
194198
multi sub is-approx(Numeric $got, Numeric $expected, $desc = '')
195199
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 = '')
197203
198204
=for code :method
199205
multi sub is-approx(Numeric $got, Numeric $expected, $desc = '',

0 commit comments

Comments
 (0)