mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-01-12 09:51:06 +00:00
adapt tests to new output and processing
This commit is contained in:
parent
ed373a8a03
commit
e366633ebd
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.96-dev-7-g0153928
|
||||
#### $$VERSION$$ 0.96-dev2-10-ged373a8
|
||||
|
||||
# common variables
|
||||
export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME
|
||||
@ -11,10 +11,11 @@ export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME
|
||||
TESTNAME="${REFDIR//-/ }"
|
||||
|
||||
# common filenames
|
||||
export TOKENFILE ACLFILE COUNTFILE ADMINFILE DATADIR JSONSHFILE
|
||||
export TOKENFILE ACLFILE COUNTFILE BLOCKEDFILE ADMINFILE DATADIR JSONSHFILE
|
||||
TOKENFILE="token"
|
||||
ACLFILE="botacl"
|
||||
COUNTFILE="count"
|
||||
COUNTFILE="count.jssh"
|
||||
BLOCKEDFILE="blocked.jssh"
|
||||
ADMINFILE="botadmin"
|
||||
DATADIR="data-bot-bash"
|
||||
JSONSHFILE="JSON.sh/JSON.sh"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.96-dev-7-g0153928
|
||||
#### $$VERSION$$ 0.96-dev2-10-ged373a8
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
@ -46,5 +46,5 @@ cd "${DIRME}" || exit 1
|
||||
echo "${SUCCESS}"
|
||||
|
||||
echo "Test bashbot.sh count"
|
||||
cp "${REFDIR}/count.test" "${TESTDIR}/count"
|
||||
#cp "${REFDIR}/count.test" "${TESTDIR}/counti.jssh"
|
||||
#"${TESTDIR}/bashbot.sh" count
|
||||
|
1
test/c-init-test/blocked.jssh
Normal file
1
test/c-init-test/blocked.jssh
Normal file
@ -0,0 +1 @@
|
||||
["blocked_user_or_chat_id"] "name and reason"
|
@ -1 +0,0 @@
|
||||
|
1
test/c-init-test/count.jssh
Normal file
1
test/c-init-test/count.jssh
Normal file
@ -0,0 +1 @@
|
||||
["counted_user_chat_id"] "num_messages_seen"
|
@ -1,80 +0,0 @@
|
||||
COUNT-3474588
|
||||
COUNT2224533
|
||||
COUNT-10011894466
|
||||
COUNT7053247
|
||||
COUNT6391479
|
||||
COUNT6341244
|
||||
COUNT4919830
|
||||
COUNT2640175
|
||||
COUNT7349731
|
||||
COUNT7244826
|
||||
COUNT2741728
|
||||
COUNT6376258
|
||||
COUNT-10012414459
|
||||
COUNT5869285
|
||||
COUNT-10011297801
|
||||
COUNT190323
|
||||
COUNT7784183
|
||||
COUNT-2766119
|
||||
COUNT-3859393
|
||||
COUNT-10013599717
|
||||
COUNT-10012886611
|
||||
COUNT2442778
|
||||
COUNT5759451
|
||||
COUNT5254245
|
||||
COUNT3781067
|
||||
COUNT7916264
|
||||
COUNT7235018
|
||||
COUNT3349831
|
||||
COUNT2933766
|
||||
COUNT5924516
|
||||
COUNT6374645
|
||||
COUNT6407149
|
||||
COUNT2383316
|
||||
COUNT5447722
|
||||
COUNT231261
|
||||
COUNT7853337
|
||||
COUNT7768269
|
||||
COUNT7546987
|
||||
COUNT7882954
|
||||
COUNT6081264
|
||||
COUNT4473899
|
||||
COUNT6000622
|
||||
COUNT7489339
|
||||
COUNT7925467
|
||||
COUNT146383
|
||||
COUNT1850458
|
||||
COUNT5232050
|
||||
COUNT7827320
|
||||
COUNT3230155
|
||||
COUNT5110579
|
||||
COUNT2968981
|
||||
COUNT6709735
|
||||
COUNT3042403
|
||||
COUNT6973351
|
||||
COUNT3739552
|
||||
COUNT6073516
|
||||
COUNT7773218
|
||||
COUNT7570810
|
||||
COUNT7165830
|
||||
COUNT7836756
|
||||
COUNT2603688
|
||||
COUNT2792256
|
||||
COUNT1199924
|
||||
COUNT7044680
|
||||
COUNT5011616
|
||||
COUNT5944645
|
||||
COUNT6040303
|
||||
COUNT7787713
|
||||
COUNT7670967
|
||||
COUNT4902763
|
||||
COUNT8168450
|
||||
COUNT5233276
|
||||
COUNT-10012311537
|
||||
COUNT7648681
|
||||
COUNT4170584
|
||||
COUNT3045040
|
||||
COUNT5919227
|
||||
COUNT3364980
|
||||
COUNT-3450384
|
||||
COUNT7287381
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.96-dev-7-g0153928
|
||||
#### $$VERSION$$ 0.96-dev2-10-ged373a8
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
@ -30,6 +30,9 @@ echo "Check process_message ..."
|
||||
set -x
|
||||
{ process_message "0"; set +x; } >>"${LOGFILE}" 2>&1;
|
||||
|
||||
USER[ID]="123456789"
|
||||
CHAT[ID]="123456789"
|
||||
|
||||
# output processed input
|
||||
print_array "USER" "CHAT" "REPLYTO" "FORWARD" "URLS" "CONTACT" "CAPTION" "LOCATION" "MESSAGE" "VENUE" >"${OUTPUTFILE}"
|
||||
diff -c "${REFFILE}" "${OUTPUTFILE}" || exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user