clitest(1)

clitest1

Performs automatic testing in command lines

Usage

clitest [options] <file ... >

Overview

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.

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, --test RANGE

Run specific tests, by number (1,2,4-7)

-s, --skip RANGE

Skip specific tests, by number (1,2,4-7)

-q, --quiet

Quiet operation, no output shown

-V, --version

Show program version and exit

-P, --progress TYPE

Set progress indicator: test, number, dot, none

--pre-flight COMMAND

Execute command before running the first test

--post-flight COMMAND

Execute command after running the last test

--color WHEN

Set when to use colors: auto, always, never

--diff-options OPTIONS

Set diff command options (default: '-u')

--inline-prefix PREFIX

Set inline output prefix (default: '#→ ')

--prefix PREFIX

Set command line prefix (default: '')

--prompt STRING

Set prompt string (default: '$ ')

Releases

Unchanged in 5 releases since Debian 9 (Stretch).

  1. 9–13

Author

The CLITEST was written by Aurelio Jargas <[email protected]>.

This manual page was written by Giovani Augusto Ferreira <[email protected]> for the Debian project (but may be used by others).

From clitest 0.5.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.