=item B<'1..M'>
This header tells how many tests there will be. It should be the
-first line output by your test program (but its okay if its preceded
+first line output by your test program (but it is okay if it is preceded
by comments).
In certain instanced, you may not know how many tests you will
platforms. This is no problem when Test::Harness is run with an
absolute path to the perl binary or when $^X can be found in the path.
-HARNESS_COMPILE_TEST currently assumes its run from the Perl source
+HARNESS_COMPILE_TEST currently assumes it is run from the Perl source
directory.
=cut
BEGIN { use_ok($module, @imports); }
These simply use the given $module and test to make sure the load
-happened ok. Its recommended that you run use_ok() inside a BEGIN
+happened ok. It is recommended that you run use_ok() inside a BEGIN
block so its functions are exported at compile-time and prototypes are
properly honored.
If pigs cannot fly, the whole block of tests will be skipped
completely. Test::More will output special ok's which Test::Harness
-interprets as skipped tests. Its important to include $how_many tests
+interprets as skipped tests. It is important to include $how_many tests
are in the block so the total number of tests comes out right (unless
you're using C<no_plan>, in which case you can leave $how_many off if
you like).
-Its perfectly safe to nest SKIP blocks.
+It is perfectly safe to nest SKIP blocks.
Tests are skipped when you B<never> expect them to B<ever> pass. Like
an optional module is not installed or the operating system doesn't
...normal testing code...
}
-With todo tests, its best to have the tests actually run. That way
+With todo tests, it is best to have the tests actually run. That way
you'll know when they start passing. Sometimes this isn't possible.
Often a failing test will cause the whole program to die or hang, even
inside an C<eval BLOCK> with and using C<alarm>. In these extreme
=head1 SEE ALSO
L<Test::Simple> if all this confuses you and you just want to write
-some tests. You can upgrade to Test::More later (its forward
+some tests. You can upgrade to Test::More later (it is forward
compatible).
L<Test::Differences> for more ways to test complex data structures.
ok( $foo eq $bar, $name );
ok( $foo eq $bar );
-ok() is given an expression (in this case C<$foo eq $bar>). If its
-true, the test passed. If its false, it didn't. That's about it.
+ok() is given an expression (in this case C<$foo eq $bar>). If it is
+true, the test passed. If it is false, it didn't. That's about it.
ok() prints out either "ok" or "not ok" along with a test number (it
keeps track of that for you).
If you provide a $name, that will be printed along with the "ok/not
ok" to make it easier to find your test when if fails (just search for
the name). It also makes it easier for the next guy to understand
-what your test is for. Its highly recommended you use test names.
+what your test is for. It is highly recommended you use test names.
All tests are run in scalar context. So this:
If you fail more than 254 tests, it will be reported as 254.
This module is by no means trying to be a complete testing system.
-Its just to get you started. Once you're off the ground its
+It's just to get you started. Once you're off the ground it is
recommended you look at L<Test::More>.