A tool for testing command-line programs.

Version on this page:1.3.5
LTS Haskell 6.30:1.3.5
Stackage Nightly 2016-05-25:1.3.5
Latest on Hackage:1.3.5
GPL licensed and maintained by Simon Michael

Module documentation for 1.3.5

There are no documented modules for this package.

shelltestrunner is a cross-platform tool for testing command-line programs (or arbitrary shell commands.) It reads simple declarative tests specifying a command, some input, and the expected output, error output and exit status. Tests can be run selectively, in parallel, with a timeout, in color, and/or with differences highlighted.


1.3.5 (2014/3/30)

* fix Applicative warning with ghc 7.10
* allow utf8-string <1.1

1.3.4 (2014/5/28)

* drop cabal-file-th, support GHC 7.8.2

1.3.3 (2014/5/25)

* allow process 1.2, regex-tdfa-1.2
* add a hackage-compatible changelog

1.3.2 (2013/11/13)

* increase upper bound on Diff package

1.3.1 (2012/12/28)

* fix cabal file typo breaking the build

1.3 (2012/12/28)

* support latest Diff, cmdargs, test-framework; tested with GHC 7.6.1 (Magnus Therning)

* fix unicode handling on GHC >= 7.2

1.2.1 (2012/3/12)

* use the more up-to-date filemanip package for easier Debian packaging

1.2 (2012/2/26)

* support latest cmdargs, test-framework, and GHC 7.4
* more readable non-quoted failure output by default; for quoted output, use -p/--precise
* the --all, --diff and --precise options now interact well

1.1 (2011/8/25)

* bump process dependency to allow building with GHC 7.2.1
* new -a/--all flag shows all failure output without truncating

1.0 (2011/7/23)

* New home page/docs
* The >>>= field is now required; you may need to add it to your existing tests
* Input and expected output can now contain lines beginning with #
* Multiple tests in a file may now have whitespace between them
* The -i/--implicit option has been dropped
* New -d/--diff option shows test failures as a unified diff when possible, including line numbers to help locate the problem
* New -x/--exclude option skips certain test files (eg platform-specific ones)
* Passing arguments through to test-framework is now more robust
* Fixed: parsing could fail when input contained left angle brackets
* Fixed: some test files generated an extra blank test at the end

0.9 (2010/9/3)

* show plain non-ansi output by default, add --color option
* better handling of non-ascii test data. We assume that non-ascii file
paths, command-line arguments etc. are UTF-8 encoded on unix systems
and that GHC 6.12 or greater is used. Then:
- non-ascii test file paths should render correctly, eg in failure messages
- non-ascii test commands should run correctly
- non-ascii expected output should match correctly
- non-ascii regular expressions should match correctly. (Caveat: not
thoroughly tested, this may break certain regexps, )
* use regex-tdfa instead of pcre-light for better windows compatibility
To avoid a memory leak in current regex-tdfa, only regular expressions
up to 300 characters in size are supported. Also, DOTALL is no longer
enabled and probably fewer regexp constructs are supported. There are
still issues on windows/wine but in theory this will help.
* tighten up dependencies

0.8 (2010/4/9)

* rename executable to shelltest. The package might also be renamed at some point.
* better built-in help
* shell tests now include a full command line, making them more readable
and self-contained. The --with option can be used to replace the first
word with something else, unless the test command line begins with a
* we also accept directory arguments, searching for test files below
them, with two new options:
--execdir execute tested command in same directory as test file
--extension=EXT file extension of test files (default=.test)

0.7 (2010/3/5)

* more robust parsing
- --debug-parse parses test files and stops
- regexps now support escaped forward slash (\/)
- bad regexps now fail at startup
- command-line arguments are required in a test, and may be blank
- a >>>= is no longer required to separate multiple tests in a file
- comments can be appended to delimiter lines
- comments can appear at end of file
- files need not have a final newline
- files containing nothing, all comments, or valid tests are allowed; anything else is rejected
- somewhat better errors
- allow indented input
* support negative (-) and negatively-matched (!) numeric exit codes
* let . in regexps match newline
* warn but continue when a test file fails to parse
* output cleanups, trim large output
* more flexible --implicit flag
* switch to the more robust and faster pcre-light regexp lib

0.6 (2009/7/15)

* allow multiple tests per file, handle bad executable better

0.5 (2009/7/14)

* show failure output in proper order

0.4 (2009/7/14)

* run commands in a more robust way to avoid hangs
This fixes hanging when a command generates large output, and hopefully
all other deadlocks. The output is consumed strictly. Thanks to Ganesh
Sittampalam for his help with this.
* --implicit-tests flag providing implicit tests for omitted fields
* --debug flag
* regular expression matching
* disallow interspersed foreign options which confused parseargs
* change comment character to #

0.3 (2009/7/11)

* misc. bugfixes/improvements

0.2 (2009/7/10)

* bugfix, build with -threaded

0.1 (2009/7/10)

* shelltestrunner, a generic shell command stdout/stderr/exit status tester
comments powered byDisqus