NIHTEST(1)
π NIHTEST(1) β the testing tool glow-up π
okay so bestie, welcome to nihtest (that's the fancy General Commands Manual energy, iykyk) β the testing tool that's literally about to be your new best friend π«Ά
β¨ SYNOPSIS β¨
nihtest [-hqVv] [--all] [-C config] [--debug] [--keep-broken] [--no-
cleanup] [--setup-only] [testcase ...]
πΈ DESCRIPTION πΈ
So. nihtest is a testing tool for command line utilities, and it slays. It eats .test files for breakfast β the whole format is spelled out in nihtest-case(5) if you wanna go read it, which you should, bestie.
nihtest runs the test cases you name on the command line or, if you pass the --all option, the ones in the suite section of the config file. Shell globs work on the command line too (yes, * is your friend π
), and test cases are expected to live in the test case directory.
Where does it look for stuff? nihtest searches the current directory and the source-directory specified in nihtest.conf(5) for test cases, input files and output files. It's thorough like that π
nihtest supports the following options:
--allβ runs all the tests specified in the suite section of the config file. all of them. the whole squad. π-Cconfig,--config-fileconfig β use config as the configuration file instead of./nihtest.conf. picky about its menu, we love that.--debugβ sets up the sandbox but runs the program inside a debugger. super handy for vibes-based investigation, but heads up: results are not checked. not me letting you poke at it freely π-h,--helpβ displays a short help message and exits. the classic.--keep-brokenβ does not delete the sandbox if the test fails. keep the crime scene intact π₯--no-cleanupβ does not delete the sandbox after the test finishes (successfully or not). no tidying, no cap.-q,--quietβ does not print test results. silent mode. stealth mode. ninja mode. π€«--setup-onlyβ only populates the sandbox, but doesn't run the actual test. a little appetiser, no main course π-v,--verboseβ prints detailed test results. give me all the lore.-V,--versionβ prints thenihtestversion number and exits. short and sweet.
π¦ the test run pipeline (a whole journey) π¦
A test run consists of the following steps:
- check if test should be skipped
- create sandbox directory
- populate sandbox directory with input files
- run program
- compare program output, exit code, and output files
- remove sandbox
it's giving process. it's giving structure. honestly obsessed β¨
π FILES π
nihtest.confβ thenihtestconfiguration file, seenihtest.conf(5)for details. it's giving main character energy for your project setup.
π EXIT STATUS π
nihtest uses the following exit codes:
0β Test passed π₯³1β Test failed π2β Other error77β Test was skipped.
π DIAGNOSTICS π
In general, differences to the test case expectation are marked up with - if something expected did not happen and + if something unexpected happened. very readable, very demure.
In case the return value does not match, nihtest will report Exit code not as expected. If the standard output or standard error output are not correct, nihtest will report Output not as expected or Error output not as expected respectively. And finally, if the file contents of the sandbox are not correct, nihtest will report Files in sandbox not as expected.
basically it tells you exactly which vibe check you failed. no guessing required π
π SEE ALSO π
okay bestie, that's the whole page π this little number is from NiH, dated September 16, 2025, and it's the NIHTEST(1) manpage β go forth and test your command line utilities with confidence, you're gonna eat π«Άβ¨
π¦ where this page comes from
- alpine 3.24: nihtest-doc 1.11.1-r0 Β· BSD-3-Clause
- Copyright (C) 2020-2023 Dieter Baron and Thomas Klausner
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms