Skip to content

lubomir/stest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# 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

About

simple testing utility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published