Giter Club home page Giter Club logo

stest's Introduction

# 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

stest's People

Contributors

lubomir avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.