Re-work the test suite so it now works with Automake (via "make check").
[mmh] / test / README
1 nmh unit test suite.
2
3 The purpose of these tests is to verify the functionality of the nmh
4 commands.  The goal of the suite is to create an environment where testing
5 nmh commands is easy and useful.  Each test is a shell script, and is
6 launched via the 'sh' command. The script should run the test and report
7 the result by one of:
8
9   * for a test pass: exit with status 0
10   * where a test has been skipped (perhaps because it depends on an
11     external program which can't be found): print "Test $0 SKIP (reason)"
12     and exit with status 77
13   * for a test fail: exit with some status other than 0 or 120
14
15 The Suite is a re-worked version of the original test suite; it now is
16 designed to work with Automake.  To run these tests you can do "make check"
17 via the top-level Makefile.  This is also done automatically via
18 "make distcheck".
19
20 If you wish to write a new test, here are the steps:
21
22 - Make sure your test script sources common.sh (the location of this script
23   is in the MH_TEST_COMMON environment variable and calls the setup_test
24   shell function (the other scripts have examples of this).
25
26 - Your path will be set up to find the locations of the test nmh binaries.
27
28 - Add your script to the TESTS variable in the toplevel Makefile.am.
29
30 - If you need additional files for your tests, be sure to add them to
31   the EXTRA_DIST variable in Makefile.am.  Note that you should insure
32   that you access these files relative to the ${srcdir} environment variable.
33
34 - Verify that the test works with both "make check" and "make distcheck".