{"repo":"felipec/sharness","free":true,"listed":false,"github":"https://github.com/felipec/sharness","clone":"git clone https://github.com/felipec/sharness.git","description":"Shell library to test your tools like Git does","language":"Shell","stars":393,"topics":["bash","ci","shell","test-anything-protocol","test-harness","testing"],"license":"GPL-2.0","category":"cli-tools","readme_excerpt":"Sharness Sharness is a portable shell library to write, run, and analyze automated tests for Unix programs. Since all tests output TAP, the [Test Anything Protocol], they can be run with any TAP harness. Each test is written as a shell script, for example: Running the above test script returns the following (TAP) output: $ ./simple.t ok 1 - Success is reported like this ok 2 - Commands are chained this way ok 3 - You can test for a specific exit code not ok 4 - We expect this to fail # TODO known breakage # still have 1 known breakage(s) # passed all remaining 3 test(s) 1..4 Alternatively, you can run the test through [prove(1)]: $ prove simple.t simple.t .. ok All tests successful. Files=1, Tests=4, 0 wallclock secs ( 0.02 usr + 0.00 sys = 0.02 CPU) Result: PASS Every test is run in a temporary trash directory, so you are free to create as many files as you want, even files in the home directory, because $HOME is set to that temporary trash directory. At the end of the test, that directory is removed (unless there's a failure). Sharness was derived from the [Git] project - see [README.git] for the original documentation. Installation First, clone the Git repository: $ git clone https://github.com/felipec/sharness.git Then choose an installation method that works best for you: Per-project installation If you like to add Sharness to the sources of a project you want to use it for, simply copy the files sharness.sh and example/Makefile to a folder named test inside that project","default_branch":null,"files":null,"tree":[],"storefront":"/r/felipec","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/felipec/sharness/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."}