diff --git a/dev/all-tests.sh b/dev/all-tests.sh index 556729e..044f028 100755 --- a/dev/all-tests.sh +++ b/dev/all-tests.sh @@ -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 diff --git a/modules/sendMessage.sh b/modules/sendMessage.sh index a410779..34a8dbe 100644 --- a/modules/sendMessage.sh +++ b/modules/sendMessage.sh @@ -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.*//')" diff --git a/test/c-init-test.sh b/test/c-init-test.sh index 6456d59..64faf92 100755 --- a/test/c-init-test.sh +++ b/test/c-init-test.sh @@ -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"; }