clitest

A CLI tool for testing command-line programs and scripts

brewmacoslinux
Try with needOr install directly
Source

About

Command-Line Tester

Commands

clitest

Examples

Run tests from a file with CLI test cases$ clitest mytest.txt
Execute tests in verbose mode to see detailed output$ clitest -v test_cases.txt
Test a specific command with inline assertions$ clitest --cmd 'echo hello' --expect 'hello'