{"repo":"simonmichael/shelltestrunner","free":true,"listed":false,"github":"https://github.com/simonmichael/shelltestrunner","clone":"git clone https://github.com/simonmichael/shelltestrunner.git","description":"Easy, repeatable testing of CLI programs/commands","language":"Haskell","stars":155,"topics":["haskell","cli","cross-platform","testing","command-line-tool"],"license":"GPL-3.0","category":"cli-tools","readme_excerpt":"Easy, repeatable testing of CLI programs/commands Install Usage Options Test formats Support/Contribute Credits shelltestrunner (executable: shelltest ) is a portable command-line tool for testing command-line programs, or general shell commands, released under GPLv3+. It reads simple test specifications defining a command to run, some input, and the expected output, stderr, and exit status. It can run tests in parallel, selectively, with a timeout, in color, etc. Install There may be a new-enough packaged version on your platform. Eg: ---------------- --------------------------------------- Debian/Ubuntu: apt install shelltestrunner Gentoo: emerge shelltestrunner Or, build the latest release on any major platform: ---------------- --------------------------------------- stack: get stack , stack install shelltestrunner-1.11 cabal: cabal update; cabal install shelltestrunner-1.11 Usage Here's a test file containing three simple tests. They're called \"shell tests\" because any shell command line can be tested. A test contains: - 2 and zero or more lines of expected stderr output, or a regexp (optional) - = and an expected exit code, or a regexp (optional) To run these tests: That's the basics! There are also some alternate test formats you'll read about below. Options shelltest accepts one or more test file or directory arguments. A directory means all files below it named .test (customisable with --extension ). By default, test commands are run with /bin/sh on POSIX systems and","default_branch":null,"files":null,"tree":[],"storefront":"/r/simonmichael","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/simonmichael/shelltestrunner/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}