README.md

CU

CU provides a simple interface for defining unit tests using macros.
Each test suite runs in a separate process - test suites does not influence
each other and any failure (such as segfault) does not break up the whole test.
CU also provides script for regression tests based on output of test suites.

License

CU is licensed under OSI-approved 3-clause BSD License, text of license
is distributed along with source code in BSD-LICENSE file.
Each file should include license notice, the rest should be considered as
licensed under 3-clause BSD License.

5. Check Regressions

While running tests stdout and stderr are redirected to files.
Each test suite has its own files stored in
tmp..{out,err} where is prefix defined
using CU_SET_OUT_PREFIX macro and is name of test suite.

In our case, it means that test suite T1 has its stdout stored
in regressions/tmp.T1.out and stderr in regressions/tmp.T1.err.
If you look there you will see that tmp.T1.out contains:

Hello from test1

and tmp.T1.err contains:

Hello from test2

Why is it so should be obvious from t1.c source code.

CU provides the python script check-regressions which checks
all files generated from test suites for regressions. This
script accepts several options, to see them all type: