2019-04-21 09:34:17 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-01-02 13:05:42 +00:00
|
|
|
#===============================================================================
|
|
|
|
#
|
|
|
|
# FILE: b-example-test.sh
|
|
|
|
#
|
|
|
|
# USAGE: must run only from dev/all-tests.sh
|
|
|
|
#
|
|
|
|
# DESCRIPTION: minimal test file as template
|
|
|
|
#
|
|
|
|
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
|
|
|
|
# AUTHOR: KayM (gnadelwartz), kay@rrr.de
|
|
|
|
#
|
|
|
|
#### $$VERSION$$ v1.21-pre-34-g9492f98
|
|
|
|
#===============================================================================
|
2019-04-21 09:34:17 +00:00
|
|
|
|
|
|
|
# include common functions and definitions
|
|
|
|
# shellcheck source=test/ALL-tests.inc.sh
|
|
|
|
source "./ALL-tests.inc.sh"
|
|
|
|
|
2021-01-02 13:05:42 +00:00
|
|
|
###
|
|
|
|
# place your tests here ....
|
|
|
|
|
|
|
|
# example: test if TESTDIR contains file bashbot.sh
|
|
|
|
printf "Check if bashbot.sh exists in %s ...\n" " ${TESTDIR}"
|
2019-04-21 09:34:17 +00:00
|
|
|
if [ -f "${TESTDIR}/bashbot.sh" ]; then
|
2021-01-02 13:05:42 +00:00
|
|
|
printf "bashbot.sh found!\n"
|
2019-04-21 09:34:17 +00:00
|
|
|
else
|
2021-01-02 13:05:42 +00:00
|
|
|
# stop test script if test failed
|
|
|
|
printf "%s\n" "${NOSUCCESS} ${TESTDIR}/bashbot.sh missing!"
|
2019-04-21 09:34:17 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-01-02 13:05:42 +00:00
|
|
|
# only if all tests was successful
|
|
|
|
printf "%s\n" "${SUCCESS}"
|
|
|
|
|