-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
49 lines (35 loc) · 1.5 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# STest
STest is a simple testing utility for checking output of command line programs.
All tests are defined in many files. All files of one test have same base name
and their extensions determine what the particular file tests. Default location
for these files is a tests/ subdirectory.
.in gets passed to standard input
.args contains command line arguments
.out is expected on standard output
.err is expected on standard error output
.ret contains expected exit code
Use the gen-test utility to easily generate these tests. Both gen-test and
stest have some help available with --help option. Man pages are installed
as well.
## Output checking
Both stdout and stderr are checked using the diff(1) utility. This produces
minimal (-d) unified diff (-u). If you need to add another argument to diff,
use --diff=OPT. Useful options include -w for ignoring whitespace changes.
# Requirements
Build dependencies of stest are a C compiler, Cutter unit testing library and
libtool. All these dependencies should be checked for by configure script.
There are also runtime dependencies: diff and optionally Valgrind for checking
memory errors.
# Building
In source directory, run
$ autoreconf -i
$ ./configure
$ make
$ make install
# TODO
+ test program via custom command (.cmd)
+ enable execution of a script before and after test (.pre, .post)
+ only print one header for one failed test
+ proper plurals in messages: contexts, lines
+ full l10n maybe?
+ run tests in a temporary directory