Sébastien Helleu
f8403c76db
api: add optional list of colors in infos "nick_color" and "nick_color_name" ( closes #1565 )
2020-10-04 08:46:36 +02:00
Sébastien Helleu
657e659c42
core: add argument "num_colors" in function gui_nick_hash_color, add tests on nick functions (issue #1565 )
...
Functions tested:
- gui_nick_hash_djb2_64
- gui_nick_hash_djb2_32
- gui_nick_hash_sum_64
- gui_nick_hash_sum_32
- gui_nick_get_forced_color
- gui_nick_strdup_for_color
- gui_nick_find_color
- gui_nick_find_color_name
2020-10-04 08:46:25 +02:00
Sébastien Helleu
1c5e5824e7
tests: run callback when resetting options in tests
2020-10-03 14:40:59 +02:00
Sébastien Helleu
579af1b265
tests: fix compilation with CppUTest ≥ 4.0
...
MemoryLeakWarningPlugin::turnOnNewDeleteOverloads is replaced by
MemoryLeakWarningPlugin::turnOnThreadSafeNewDeleteOverloads, which is available
in both CppUTest 3.x and 4.0.
2020-08-29 10:18:50 +02:00
Sébastien Helleu
cfd221014c
api: add argument "bytes" in function string_dyn_concat
2020-08-23 23:27:57 +02:00
Sébastien Helleu
268aa631c6
api: add function string_color_code_size (issue #1547 )
2020-08-22 08:55:16 +02:00
Sébastien Helleu
d15db0ecbb
core: set "notify_level" to 3 if there is a highlight in the line ( closes #1529 )
2020-08-15 14:02:40 +02:00
Sébastien Helleu
0cc5df6649
irc: send all channels in a single JOIN command when reconnecting to the server ( closes #1551 )
2020-08-05 20:05:36 +02:00
Sébastien Helleu
36c55f6973
tests: fix name of some unit tests
2020-08-05 07:28:30 +02:00
Sébastien Helleu
8cf56dfdf9
tests: add tests on GUI line functions
...
Functions tested:
- gui_line_lines_alloc
- gui_line_lines_free
- gui_line_tags_alloc
- gui_line_tags_free
- gui_line_is_displayed
- gui_line_has_tag_no_filter
- gui_line_search_tag_starting_with
- gui_line_get_nick_tag
2020-08-04 23:42:20 +02:00
Sébastien Helleu
5b151d1639
irc: check that the first nick char is not a prefix char or chantype in function irc_nick_is_nick
2020-06-21 10:22:37 +02:00
Sébastien Helleu
4a42cda3a5
irc: change default chantypes from "#&+!" to "#&"
...
The default chantypes was conflicting with
irc_server_prefix_chars_default ("@+").
2020-06-21 10:22:04 +02:00
Sébastien Helleu
9446610452
tests: add test of function irc_nick_is_nick with invalid UTF-8 string
2020-06-20 17:44:48 +02:00
Sébastien Helleu
12051a506d
irc: add support of UTF8MAPPING, add support of optional server in info "irc_is_nick" ( closes #1528 )
2020-06-20 17:28:28 +02:00
Sébastien Helleu
bf964de939
tests: add tests on IRC function irc_channel_is_channel
2020-06-20 12:04:40 +02:00
Sébastien Helleu
e41eeaf203
tests: add tests on IRC command ACCOUNT with colon before the account name
2020-06-16 08:07:55 +02:00
Sébastien Helleu
8818fbb233
tests: fix memory leak in test of function string_hex_dump
2020-05-31 14:51:41 +02:00
Sébastien Helleu
aaa49d3188
tests: add tests on function string_input_for_buffer with custom command chars
2020-05-21 10:06:51 +02:00
Sébastien Helleu
f4913d0a6b
tests: add tests on function string_is_command_char with custom command chars
2020-05-21 10:06:42 +02:00
Sébastien Helleu
99b13aa671
tests: add test on function string_base64_decode with truncated base64 string
2020-05-21 09:56:35 +02:00
Sébastien Helleu
a997893cfe
tests: add test on function string_base16_decode with a char >= 0xA0
2020-05-21 09:55:40 +02:00
Sébastien Helleu
66d4590dab
core: add base 16/32/64 encoding/decoding in evaluation of expressions
2020-05-21 09:36:35 +02:00
Sébastien Helleu
1994d5641d
core: move functions string_base_encode and string_base_decode from plugin-api.c to wee-string.c
2020-05-21 00:02:24 +02:00
Sébastien Helleu
0ac936a5cf
core: return -1 in case of error in functions string_base16_decode and string_base64_decode
2020-05-21 00:01:35 +02:00
Sébastien Helleu
62ccee9505
tests: run tests on plugins only if the plugins are enabled and compiled
2020-05-17 15:29:06 +02:00
Sébastien Helleu
3505324096
api: use buffer pointer in argument "modifier_data" sent to weechat_print modifier callback ( closes #42 )
2020-05-09 10:08:18 +02:00
Sébastien Helleu
88bef0b1b1
core: rename functions hook_completion_{get_string|list_add} to completion_{get_string|list_add}
...
Old functions are kept for compatibility reasons.
2020-05-08 10:51:30 +02:00
Sébastien Helleu
b1c3a29ac7
core: add include comparison operators in evaluation of expressions
...
New comparison operators:
- "==*": is matching mask, case sensitive (wildcard "*" is allowed)
- "!!*": is NOT matching mask, case sensitive (wildcard "*" is allowed)
- "==-": is included, case sensitive
- "!!-": is NOT included, case sensitive
- "=-": is included, case insensitive
- "!-": is NOT included, case insensitive
2020-05-05 20:43:45 +02:00
Sébastien Helleu
2b05b64cc1
tests: fix pylint errors
2020-05-03 20:22:21 +02:00
Sébastien Helleu
100440c8a1
core: restore signal "signal_sighup", and if eaten do not reload configuration
2020-04-21 22:34:42 +02:00
Sébastien Helleu
60b75f4677
tests: add tests on functions relay_auth_password_hash_algo_search and relay_auth_generate_nonce
2020-04-20 07:16:08 +02:00
Sébastien Helleu
d38701f99f
tests: reduce number of iterations in PBKDF2 tests from 100000 to 1000
...
This speeds up tests by about 30%.
2020-04-19 10:56:25 +02:00
Sébastien Helleu
bfe22fc66a
tests: remove obsolete file test-relay-weechat-protocol.cpp
2020-04-19 10:56:11 +02:00
Sébastien Helleu
9fa3609c85
relay: add command "handshake" in weechat relay protocol and nonce to prevent replay attacks ( closes #1474 )
...
This introduces a new command called "handshake" in the weechat relay protocol.
It should be sent by the client before the "init" command, to negotiate the way
to authenticate with a password.
3 new options are added:
* relay.network.auth_password
* relay.network.hash_iterations
* relay.network.nonce_size
2020-04-14 21:38:12 +02:00
Sébastien Helleu
7fbd4c1079
tests: add missing include of locale.h
...
This fixes build of tests on FreeBSD.
2020-04-11 00:01:31 +02:00
Sébastien Helleu
9afe63b77a
tests: fix name of tests
2020-04-10 23:43:27 +02:00
Sébastien Helleu
007fd03bc8
tests: add tests on calc functions
...
Functions tested:
- calc_operator_precedence
- calc_pop_value
- calc_list_free_cb
- calc_operation
- calc_operation_stacks
2020-04-08 21:38:51 +02:00
Sébastien Helleu
a693125c81
tests: add missing include of stdio.h (issue #1469 )
2020-04-07 22:20:11 +02:00
Sébastien Helleu
d78ac827e9
core: fix memory leak in calculation of expression on FreeBSD ( closes #1469 )
...
The memory leak was caused by a bug in function setlocale on FreeBSD:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243195
The fix is the following:
* Remove the calls to setlocale when formatting the result.
* The function snprintf is still called, and then is now locale dependent,
for example in French the decimal separator is a comma instead of a dot.
* A new function calc_sanitize_decimal_number is introduced to "sanitize" a
decimal number: keep only the decimal separator (replace it by a dot) and
remove any other separator found.
Unit tests are added on these functions:
* calc_sanitize_decimal_number
* calc_format_result
2020-04-07 21:37:48 +02:00
Sébastien Helleu
c59f812c74
tests: add tests on function irc_protocol_cb_353 with option irc.look.color_nicks_in_names set to on
2020-03-31 21:16:09 +02:00
Sébastien Helleu
eb7b12f0da
tests: add tests on IRC color functions
...
Functions tested:
- irc_color_convert_rgb2irc
- irc_color_convert_term2irc
- irc_color_for_tags
- irc_color_modifier_cb
- irc_color_weechat_add_to_infolist
2020-03-30 20:58:16 +02:00
Sébastien Helleu
052d4d1fc0
tests: add test with remapped color in function irc_color_decode
2020-03-30 20:55:43 +02:00
Sébastien Helleu
8738196b68
tests: add tests on remaining IRC protocol functions and callbacks
2020-03-28 16:06:45 +01:00
Sébastien Helleu
f072eb8d78
tests: add tests on function irc_protocol_get_message_tags
2020-03-28 13:40:39 +01:00
Sébastien Helleu
4245641767
tests: add tests on function irc_protocol_cb_ping
2020-03-26 23:05:34 +01:00
Sébastien Helleu
b82a887f2a
tests: add tests on function irc_protocol_cb_part
2020-03-25 20:48:54 +01:00
Sébastien Helleu
cecbad1803
tests: add test with no arguments for AWAY command
2020-03-24 16:58:11 +01:00
Sébastien Helleu
9fac350b3f
tests: add tests on IRC protocol functions with not enough arguments
2020-03-24 16:56:57 +01:00
Sébastien Helleu
4480c7b7cc
irc: split AUTHENTICATE message in 400-byte chunks ( closes #1459 )
2020-03-21 14:28:53 +01:00
Sébastien Helleu
5c1dfcbe5b
tests: add tests on functions irc_protocol_cb_mode and irc_protocol_cb_nick
2020-03-19 23:01:59 +01:00