Skip to content

Commit 8dc82a5

Browse files
committed
Add actual code examples for like/unlike
1 parent b388df6 commit 8dc82a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/Language/testing.pod

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,17 @@ strings, such as C<'=='> or C<'~~'>.
212212
213213
=item like($obtained, $expected-regex, $description?)
214214
215+
like 'foo', /fo/, 'foo looks like fo';
216+
215217
Marks a test as passed if the C<$obtained> C<Str> matches the
216218
C<$expected-regex>. The function accepts an optional C<$description> of the
217219
test. The regex to match can be either a pre-declared C<Regex> object or
218220
defined directly in the argument to C<like>.
219221
220222
=item unlike($obtained, $expected-regex, $description?)
221223
224+
unlike 'foo', /bar/, 'foo does not look like bar';
225+
222226
Marks a test as failed if the C<$obtained> C<Str> matches the
223227
C<$expected-regex>. The function accepts an optional C<$description> of the
224228
test. The regex to match can be either a pre-declared C<Regex> object or

0 commit comments

Comments
 (0)