fix bashbot tests

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-12-25 20:08:29 +01:00
parent ffc1ecf7be
commit 88d1de2009
3 changed files with 4 additions and 7 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# this has to run once atfer git clone
# 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,
# no matter from which directory we'll run script

View File

@ -6,7 +6,7 @@
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#
# shellcheck disable=SC1117
#### $$VERSION$$ v1.2-dev2-68-gc39c1ca
#### $$VERSION$$ v1.2-dev2-76-gffc1ecf
# 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')"
#shellcheck disable=SC2001
text="$(sed <<< "${text}" 's/ *mynewlinestartshere */\n/g')"
text="${text//$'\n'/\\n}"
[ "$3" != "safe" ] && {
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.*//')"

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v1.2-7-gd6e1c22
#### $$VERSION$$ v1.2-dev2-76-gffc1ecf
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh
@ -45,7 +45,3 @@ trap '' EXIT
cd "${DIRME}" || exit 1
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"; }