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
|
|
|
|
#
|
2022-06-27 18:18:58 +00:00
|
|
|
#### $$VERSION$$ v1.52-1-g0dae2db
|
2021-01-02 13:05:42 +00:00
|
|
|
#===============================================================================
|
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 15:00:59 +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}"
|
|
|
|
|