mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-25 16:57:33 +00:00
tests: test template printf conversion
This commit is contained in:
parent
9492f9828a
commit
32b99dcf2b
@ -1,16 +1,35 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# file: b-example-test.sh
|
#===============================================================================
|
||||||
#### $$VERSION$$ v1.20-0-g2ab00a2
|
#
|
||||||
|
# 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
|
||||||
|
#===============================================================================
|
||||||
|
|
||||||
# include common functions and definitions
|
# include common functions and definitions
|
||||||
# shellcheck source=test/ALL-tests.inc.sh
|
# shellcheck source=test/ALL-tests.inc.sh
|
||||||
source "./ALL-tests.inc.sh"
|
source "./ALL-tests.inc.sh"
|
||||||
|
|
||||||
|
###
|
||||||
|
# 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
|
if [ -f "${TESTDIR}/bashbot.sh" ]; then
|
||||||
echo "${SUCCESS} bashbot.sh exist!"
|
printf "bashbot.sh found!\n"
|
||||||
exit 0
|
|
||||||
else
|
else
|
||||||
echo "${NOSUCCESS} ${TESTDIR}/bashbot.sh missing!"
|
# stop test script if test failed
|
||||||
|
printf "%s\n" "${NOSUCCESS} ${TESTDIR}/bashbot.sh missing!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# only if all tests was successful
|
||||||
|
printf "%s\n" "${SUCCESS}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user