Recently I stumbled upon a bug of an funtion in a shellscript and wanted to make sure that this bug never happens again. So i searched around and found shunit2 a nice xUnit based test framework for shell scripts.
If you ever had thought about writing unit tests for your shell scripts, do it! Its really easy, and shunit2 also supports zsh
Example test sript:
#! /bin/sh testEquality() { assertEquals 1 1 } . shunit2For more examples have a look at the tests for grml-autoconfig or at the example directory of the shunit2 package