cmdarg_info had no test coverage, plz2fix

This commit is contained in:
2014-08-12 07:56:19 -07:00
parent 2f65202f34
commit 977badef4b

18
tests/test_info.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/bash4
source $(dirname ${BASH_SOURCE[0]})/../cmdarg.sh
function shunittest_info_reject_invalid
{
cmdarg_purge
cmdarg_info INVALID_SECTION || return 0
}
function shunittest_info_accept_valid
{
set -e
cmdarg_purge
cmdarg_info header 'Some header from the info'
cmdarg_parse --help 2>&1 | grep 'Some header from the info'
set +e
}