Currently I\'m doing some unit tests which are executed from bash. Unit tests are initialized, executed and cleaned up in a bash script. This script usualy contains an init(
I would improve it to:
fn_exists() { type $1 2>/dev/null | grep -q 'is a function' }
And use it like this:
fn_exists test_function if [ $? -eq 0 ]; then echo 'Function exists!' else echo 'Function does not exist...' fi