mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-22 15:35:09 +00:00
init test files
This commit is contained in:
parent
b1aef7d6f9
commit
7512681d64
@ -38,8 +38,8 @@ Starting with version 0.70 bashbot has a test suite. To start testsuite run ```t
|
|||||||
To create a new test create a new bash script named ```p-name-test.sh```, where p is pass 'a-z' and name the name of your test.
|
To create a new test create a new bash script named ```p-name-test.sh```, where p is pass 'a-z' and name the name of your test.
|
||||||
All tests with the same pass are performed together.
|
All tests with the same pass are performed together.
|
||||||
|
|
||||||
Tests with no dependency to other tests will run in pass 'a', tests which need an initialized bahsbot environment must run in pass 'c' or later.
|
Tests with no dependency to other tests will run in pass 'a', tests which need an initialized bahsbot environment must run in pass 'd' or later.
|
||||||
If '$1' is present the script is started from 'ALL-tests.sh' and the script runs in a temporary test environment in directory '$1'.
|
If '$1' is present the script is started from 'ALL-tests.sh' and a temporary test environment is setup in directory '$1'.
|
||||||
The temporary test environment is created when 'ALL-tests.sh' starts and deleted after all tests are finished.
|
The temporary test environment is created when 'ALL-tests.sh' starts and deleted after all tests are finished.
|
||||||
|
|
||||||
Example test
|
Example test
|
||||||
@ -63,5 +63,5 @@ fi
|
|||||||
|
|
||||||
#### [Prev Function Reference](6_function.md)
|
#### [Prev Function Reference](6_function.md)
|
||||||
|
|
||||||
#### $$VERSION$$ 0.70-dev-16-g2eac362
|
#### $$VERSION$$ 0.70-dev-17-gb1aef7d
|
||||||
|
|
||||||
|
@ -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$$ 0.70-dev-16-g2eac362
|
#### $$VERSION$$ 0.70-dev-17-gb1aef7d
|
||||||
|
|
||||||
# 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
|
||||||
@ -12,7 +12,7 @@ cd "${GIT_DIR}/.." || exit 1
|
|||||||
TESTENV="/tmp/bashbot.test$$"
|
TESTENV="/tmp/bashbot.test$$"
|
||||||
cp -r . "${TESTENV}"
|
cp -r . "${TESTENV}"
|
||||||
|
|
||||||
cd "${TESTENV}" || exit 1
|
#cd "${TESTENV}" || exit 1
|
||||||
|
|
||||||
#set -e
|
#set -e
|
||||||
fail=0
|
fail=0
|
||||||
@ -46,6 +46,6 @@ else
|
|||||||
exitcode=1
|
exitcode=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "${TESTENV}"
|
#rm -rf "${TESTENV}"
|
||||||
echo "${passed} / ${tests}"
|
echo "${passed} / ${tests}"
|
||||||
exit ${exitcode}
|
exit ${exitcode}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#### $$VERSION$$ 0.70-dev-16-g2eac362
|
#### $$VERSION$$ 0.70-dev-17-gb1aef7d
|
||||||
|
|
||||||
dev/hooks/pre-commit.sh
|
dev/hooks/pre-commit.sh
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#### $$VERSION$$ 0.70-dev-16-g2eac362
|
#### $$VERSION$$ 0.70-dev-17-gb1aef7d
|
||||||
|
|
||||||
dev/hooks/pre-push.sh
|
dev/hooks/pre-push.sh
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#### $$VERSION$$ 0.70-dev-16-g2eac362
|
#### $$VERSION$$ 0.70-dev-17-gb1aef7d
|
||||||
|
|
||||||
TOKENFILE="./token"
|
TOKENFILE="./token"
|
||||||
TESTTOKEN="bashbottestscript"
|
TESTTOKEN="bashbottestscript"
|
||||||
|
0
test/c-init-test/botacl
Normal file
0
test/c-init-test/botacl
Normal file
1
test/c-init-test/botadmin
Normal file
1
test/c-init-test/botadmin
Normal file
@ -0,0 +1 @@
|
|||||||
|
?
|
80
test/c-init-test/count.test
Normal file
80
test/c-init-test/count.test
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
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
|
Loading…
Reference in New Issue
Block a user