Quickstart
----------

1. Run `make' to build the test tool and run the tests.

2. Point browser to `out/index.html' to view results.


Writing tests
-------------

Tests are read from all *.ml files in `tests_db' directory. We annotate
the source files to specify the expected behaviour. We may also group
tests. See `tests_db/*.ml' for examples.


Runtest
-------

The core testing utility is the `runtest' program. The miscellenous perl
scripts simply invoke this program with the correct input and place the
resulting output in the right places.

Run test case `foo' using the following command:

  ./runtest -t foo

Use -help parameter for more usage information.

Note that the `-vv' flag is useful during debugging -- causes both stdout and
stderr to be output, e.g.

  ./runtest -vv -t foo

To run all tests in all test families, and get the summary simply execute the
following command:

  ./runtests

Traces appear in `out' directory by default, compilation files are placed
in `tmp' directory.

Keywords for annotations, must have one from first group for a test:

  COMPILE         compiles ok
  COMPFAIL <pat>  fails to compile, returns error on stderr matched by <pat>
  RUNFAIL <pat>   fails to run, ...    
  RET <pat>       exits normally, returns output on stdout matched by <pat>
                  use empty pat to check that simply exits normally
  DOC             data to print when test is run
  OPTS            options to pass to compiler
  LIBS            additional libraries to pass to compiler
  FAM             family test belongs to
  GROUP           group test belongs to

Note that the exact patterns (<pat>) are expected in a form of a regular
expression. If you simply want a substring to match, write for example

  RET .*foo.*
