shelltestrunner: A handy tool for testing command-line programs.
Run a given program through "shell" tests specifed by
one or more test files, each of which specifies:
command-line arguments, input, expected output,
expected stderr output, and expected exit code. This
was extracted from the hledger project, and inspired
by the tests in John Wiegley's ledger project.
This uses test-framework's test runner. Output order
is currently a bit mixed up. Any command-line options
are passed through to the test-framework runner, but
they must not contain spaces, so use eg -tpattern not
-t pattern. You may be able to get a big speedup by
running tests in parallel: try -j8.
Usage:
$ shelltestrunner [testrunneropts] executable testfile1 [testfile2 ...]
Test file format:
-opt1 -opt2 arg1 arg2
<<<
0 or more lines of input
>>>
0 or more lines of expected output
>>>2
0 or more lines of expected error output
>
Lines whose first non-whitespace character is ; are
ignored, mostly. The first line is the command line,
to be appended to the executable name. All remaining
fields are optional; when omitted they are assumed
to be "", "", "", and 0 respectively.
Downloads
- shelltestrunner-0.2.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.2.1, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.9, 1.9.0.1, 1.10 |
---|---|
Dependencies | base (>=3 && <4.18), HUnit, parsec, process, test-framework, test-framework-hunit (>=0.2 && <0.3) [details] |
Tested with | ghc ==6.10 |
License | LicenseRef-GPL |
Author | Simon Michael <simon@joyful.com> |
Maintainer | Simon Michael <simon@joyful.com> |
Revised | Revision 1 made by AndreasAbel at 2023-06-30T08:16:37Z |
Category | Testing |
Home page | http://joyful.com/darcsweb/darcsweb.cgi?r=shelltestrunner |
Uploaded | by SimonMichael at 2009-07-11T02:05:11Z |
Distributions | Debian:1.9, LTSHaskell:1.10, NixOS:1.10, Stackage:1.10 |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Executables | shelltestrunner |
Downloads | 21810 total (14 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs not available [build log] All reported builds failed as of 2016-12-31 [all 7 reports] |