1NIHTEST(1)                  General Commands Manual                 NIHTEST(1)
2
3
4

NAME

6       nihtest - testing tool
7

SYNOPSIS

9       nihtest [-hqVv] [-C config] [--keep-broken] [--no-cleanup] [--setup-
10               only] testcase
11

DESCRIPTION

13       nihtest is a testing tool for command line utilities.  It uses .test
14       files as input.  The format of these files is described in nihtest-
15       case(5).
16
17       nihtest runs the test case testcase expected in the test case directory
18       (see nihtest.conf(5)) in the file testcase or testcase.test.  nihtest
19       searches the current directory and the source-directory specified in
20       nihtest.conf(5) for test cases, input and output files.
21
22       nihtest supports the following options
23
24               -C config, --config-file config
25                                Use config as configuration file instead of
26                                ./nihtest.conf.
27
28               -h, --help       Display a short help message and exit.
29
30               --keep-broken    Do not delete the sandbox if the test fails.
31
32               --no-cleanup     Do not delete the sandbox after the test
33                                finishes (successfully or not).
34
35               -q, --quiet      Do not print test results.
36
37               --setup-only     Only populate the sandbox, but do not run the
38                                actual test.
39
40               -v, --verbose
41                                Print detailed test results.
42
43               -V, --version
44                                Print nihtest version number and exit.
45
46       A test run consists of the following steps:
47               check if test should be skipped
48               create sandbox directory
49               populate sandbox directory with input files
50               run program
51               compare program output, exit code, and output files
52               remove sandbox
53

FILES

55       nihtest.conf     nihtest configuration file, see nihtest.conf(5) for
56                        details
57

EXIT STATUS

59       nihtest uses the following exit codes:
60               0    Test passed
61               1    Test failed
62               2    Other error
63               77   Test was skipped.
64

DIAGNOSTICS

66       In general, differences to the test case expectation are marked up with
67       “-” if something expected did not happen and “+” if something
68       unexpected happened.
69
70       In case the return value does not match, nihtest will report “Exit code
71       not as expected”.  If the standard output or standard error output are
72       not correct, nihtest will report “Output not as expected” or “Error
73       output not as expected” respectively.  And finally, if the file
74       contents of the sandbox are not correct, nihtest will report “Files in
75       sandbox not as expected”.
76

SEE ALSO

78       nihtest-case(5), nihtest.conf(5)
79
80
81
82Linux 6.3.8-200.fc38.x86_64      June 9, 2023                       NIHTEST(1)
Impressum