blob: edca0a45166513c901087466425439ebec78ad38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
== Tabs
I use the following tabs during the development:
1) bitlbee-skype:
vim, make, etc.
2) bitlbee:
gdb --args ./bitlbee -v -n -D
run
3) skyped:
python skyped.py -n -d
4) irssi
== Tests
The plugin is tested with a mocked IRC client and a mocked skyped.
To run tests with bitlbee built in a development tree and not (the one)
installed in the system (e.g. /usr), make sure to specify --plugindir= option to
./configure script during the build process:
bitlbee% ./configure --skype=1 --plugindir="$(realpath .)"
Otherwise bitlbee will try to load skype.so (among other things) from /usr/lib,
which is probably not what you want to test, or produce "Unknown protocol"
error.
To add a new test, the following steps are necessary:
1) Add a new -skyped.mock file: just do the test manually, copy&paste the
skyped output and clean it up, so Alice talks to Bob. You can test the created
mock file by starting skyped with the -m option, and testing it from an IRC
client manually.
2) Add a new -bitlbee.mock file: do the test manually from irssi, and use:
/connect -rawlog rawlog localhost
Then clean up the rawlog: the input lines are parsed as matching patterns, so
boring prefix/suffix text can be left out, non-interesting lines can be
deleted. The output lines still have to be strict IRC commands, as usual.
3) Add the new test to test.py and run it!
// vim: ft=asciidoc
|