mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-02-05 20:08:23 +00:00
fix bashbot tests
This commit is contained in:
parent
ffc1ecf7be
commit
88d1de2009
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# this has to run once atfer git clone
|
# this has to run once atfer git clone
|
||||||
# and every time we create new hooks
|
# and every time we create new hooks
|
||||||
#### $$VERSION$$ v1.2-dev2-11-ga25f876
|
#### $$VERSION$$ v1.2-dev2-76-gffc1ecf
|
||||||
|
|
||||||
# magic to ensure that we're always inside the root of our application,
|
# magic to ensure that we're always inside the root of our application,
|
||||||
# no matter from which directory we'll run script
|
# no matter from which directory we'll run script
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||||
#
|
#
|
||||||
# shellcheck disable=SC1117
|
# shellcheck disable=SC1117
|
||||||
#### $$VERSION$$ v1.2-dev2-68-gc39c1ca
|
#### $$VERSION$$ v1.2-dev2-76-gffc1ecf
|
||||||
|
|
||||||
# will be automatically sourced from bashbot
|
# will be automatically sourced from bashbot
|
||||||
|
|
||||||
@ -280,6 +280,7 @@ send_message() {
|
|||||||
text="$(sed <<< "${2}" 's/ mykeyboardend.*//;s/ *my[kfltab][a-z]\{2,13\}startshere.*//')$(sed <<< "${2}" -n '/mytextstartshere/ s/.*mytextstartshere//p')"
|
text="$(sed <<< "${2}" 's/ mykeyboardend.*//;s/ *my[kfltab][a-z]\{2,13\}startshere.*//')$(sed <<< "${2}" -n '/mytextstartshere/ s/.*mytextstartshere//p')"
|
||||||
#shellcheck disable=SC2001
|
#shellcheck disable=SC2001
|
||||||
text="$(sed <<< "${text}" 's/ *mynewlinestartshere */\n/g')"
|
text="$(sed <<< "${text}" 's/ *mynewlinestartshere */\n/g')"
|
||||||
|
text="${text//$'\n'/\\n}"
|
||||||
[ "$3" != "safe" ] && {
|
[ "$3" != "safe" ] && {
|
||||||
no_keyboard="$(sed <<< "${2}" '/mykeyboardendshere/!d;s/.*mykeyboardendshere.*/mykeyboardendshere/')"
|
no_keyboard="$(sed <<< "${2}" '/mykeyboardendshere/!d;s/.*mykeyboardendshere.*/mykeyboardendshere/')"
|
||||||
keyboard="$(sed <<< "${2}" '/mykeyboardstartshere /!d;s/.*mykeyboardstartshere *//;s/ *my[nkfltab][a-z]\{2,13\}startshere.*//;s/ *mykeyboardendshere.*//')"
|
keyboard="$(sed <<< "${2}" '/mykeyboardstartshere /!d;s/.*mykeyboardstartshere *//;s/ *my[nkfltab][a-z]\{2,13\}startshere.*//;s/ *mykeyboardendshere.*//')"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#### $$VERSION$$ v1.2-7-gd6e1c22
|
#### $$VERSION$$ v1.2-dev2-76-gffc1ecf
|
||||||
|
|
||||||
# include common functions and definitions
|
# include common functions and definitions
|
||||||
# shellcheck source=test/ALL-tests.inc.sh
|
# shellcheck source=test/ALL-tests.inc.sh
|
||||||
@ -45,7 +45,3 @@ trap '' EXIT
|
|||||||
cd "${DIRME}" || exit 1
|
cd "${DIRME}" || exit 1
|
||||||
echo "${SUCCESS}"
|
echo "${SUCCESS}"
|
||||||
|
|
||||||
echo "Test bashbot.sh stat"
|
|
||||||
cp "${REFDIR}/count.test" "${TESTDIR}/count.jssh"
|
|
||||||
"${TESTDIR}/bashbot.sh" stats >"${TESTDIR}/stats.out"
|
|
||||||
diff -q "${TESTDIR}/stats.out" "${REFDIR}/stats.out" >>"${LOGFILE}" || { echo "${NOSUCCESS} Fail diff stats output!"; FAIL="1"; }
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user