tush: literate testing for shell scripts
I've just released
tush, a program-testing tool. Yes, the day after I sang the praises of 18th-century gay hobbit porn, this package rejoices in commands like
tush-check and
tush-bless, but honestly, it's a coincidence. I didn't want 2007 to go by without a single software release outside of work, and this one had the least left to fix. (The documentation is still in need of a wit transplant it's not going to get.)
Literate testing mixes executable tests into natural-language documents. The
UpDoc page explains why:
- Nonexecutable documentation tends to start out inaccurate and grow worse.
- Conversely, unless tests stay intimate with documentation, they degenerate: "To keep the tests running as the software is changed, the purpose of the test is often lost, and the test is gradually changed into one that always passes."
- Software can support experimental reading. In Emacs you can change tush examples and gauge the effect at the press of a key.
- This extends to interactive or adversarial writing to produce the document in the first place.
The literate testing tools I know of are built around different programming languages; tush's language is the Unix shell.
( Dull prosaic README )*wonders if anyone will flag this for adult content*