clitest - performs automatic testing in command lines
Contents
Description
Clitest is a portable POSIX shell script that performs automatic testing in Unix command lines. This
script was carefully coded to be portable between POSIX shells
It's the same concept as in Python's doctest module: you document both the commands and their expected
output, using the familiar interactive prompt format, and a specialized tool tests them.
The clitest command searches for pieces of text that look like interactive Unix command lines, and then
executes those command lines to verify that they work exactly as shown.
Name
clitest - performs automatic testing in command lines
Options
-1,--first
Stop execution upon first failed test
-l,--list
List all the tests (no execution)
-L,--list-run
List all the tests with OK/FAIL status
-t,--testRANGE
Run specific tests, by number (1,2,4-7)
-s,--skipRANGE
Skip specific tests, by number (1,2,4-7)
-q,--quiet
Quiet operation, no output shown
-V,--version
Show program version and exit
-P,--progressTYPE
Set progress indicator: test, number, dot, none
--pre-flightCOMMAND
Execute command before running the first test
--post-flightCOMMAND
Execute command after running the last test
--colorWHEN
Set when to use colors: auto, always, never
--diff-optionsOPTIONS
Set diff command options (default: '-u')
--inline-prefixPREFIX
Set inline output prefix (default: '#→ ')
--prefixPREFIX
Set command line prefix (default: '')
--promptSTRING
Set prompt string (default: '$ ')
Synopsis
clitest [options] <file ...>
