telegram-bot-bash/test/b-example-test.sh

36 lines
986 B
Bash
Raw Normal View History

#!/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.25-dev-14-g2fe6d4b
2021-01-02 13:05:42 +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}"
if [ -f "${TESTDIR}/bashbot.sh" ]; then
2021-01-02 15:00:59 +00:00
printf " ... bashbot.sh found!\n"
else
2021-01-02 13:05:42 +00:00
# stop test script if test failed
printf "%s\n" "${NOSUCCESS} ${TESTDIR}/bashbot.sh missing!"
exit 1
fi
2021-01-02 13:05:42 +00:00
# only if all tests was successful
printf "%s\n" "${SUCCESS}"