X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FLeaner.pm;h=b07fbcac25b8e29e9418b09f32bbcaaa3c465a6c;hb=bc94fb7770772cf212e7d3d4f6ef8a2cd69a290d;hp=80cac1328e33a3d8ce13d604f82b21efb7353a4c;hpb=cafe4d866180397d8574bafef7a795fab1d2f155;p=perl%2Fmodules%2FTest-Leaner.git diff --git a/lib/Test/Leaner.pm b/lib/Test/Leaner.pm index 80cac13..b07fbca 100644 --- a/lib/Test/Leaner.pm +++ b/lib/Test/Leaner.pm @@ -37,7 +37,7 @@ Its functions behave the same as their L counterparts, except for th =item * Stringification isn't forced on the test operands. -However, L honors C<'bool'> overloading, L and L honor C<'eq'> overloading (and just that one) and L honors whichever overloading category corresponds to the specified operator. +However, L honors C<'bool'> overloading, L and L honor C<'eq'> overloading (and just that one), L honors C<'ne'> overloading, and L honors whichever overloading category corresponds to the specified operator. =item * @@ -121,7 +121,7 @@ our @EXPORT = qw< =head2 C If this environment variable is set, L will replace its functions by those from L. -Moreover, the symbols that are imported you C will be those from L, but you can still only import the symbols originally defined in L (hence the functions from L that are not implemented in L will not be imported). +Moreover, the symbols that are imported when you C will be those from L, but you can still only import the symbols originally defined in L (hence the functions from L that are not implemented in L will not be imported). If your version of L is too old and doesn't have some symbols (like L or L), they will be replaced in L by croaking stubs. This may be useful if your L-based test script fails and you want extra diagnostics. @@ -408,10 +408,10 @@ sub ok ($;$) { ++$test; my $test_str = "ok $test"; - unless ($ok) { + $ok or do { $test_str = "not $test_str"; ++$failed; - } + }; if (defined $desc) { _sanitize_comment($desc); $test_str .= " - $desc" if length $desc;