79 Commits

Author SHA1 Message Date
Sébastien Helleu
8a32249507 javascript: fix detection of libv8 with autotools on Ubuntu Trusty 2017-10-07 21:43:18 +02:00
Sébastien Helleu
e317a6856c tests: add PHP plugin in tests 2017-09-03 21:49:48 +02:00
Sébastien Helleu
c65137667b tests: improve tests on dynamic strings 2017-08-20 11:26:23 +02:00
Sébastien Helleu
b879df09b5 tests: check that fset plugin is loaded 2017-06-25 16:35:28 +02:00
Simmo Saan
1329dfb57a core: add wildcard matching operators to eval (closes #608) 2017-04-29 17:04:44 +02:00
Sébastien Helleu
5b78cb2a7b tests: fix compilation warning on FreeBSD 2017-04-26 22:28:03 +02:00
Sébastien Helleu
112bebcddf core: add a way to count the suffix length in max chars displayed in cut of string ("cut:" and "cutscr:") (closes #963)
The format to use is one of:

- ${cut:+max,suffix,string}
- ${cutscr:+max,suffix,string}

With the "+" before max, WeeChat ensures there are at most "max" chars in
output, including the length of suffix string.
2017-04-24 22:37:49 +02:00
Sébastien Helleu
94355e2e38 core: ensure length is not negative in function string_strndup 2017-04-22 15:15:54 +02:00
Sébastien Helleu
6ab7af705e tests: fix tests on dynamic strings 2017-04-01 12:16:12 +02:00
Sébastien Helleu
bb00b6b8fb core: add ${re:#} to get the index of last group captured in evaluation of expressions 2017-03-30 22:13:14 +02:00
Sébastien Helleu
467f482ea6 core: make "callback_cmp" optional in call to function arraylist_new()
If no callback is given, a default callback is used, which just compares
pointers.
2017-03-30 20:35:16 +02:00
Sébastien Helleu
eb2d0ac58a tests: add tests on combining characters in cut/cutscr (evaluation of expression) 2017-03-28 22:09:11 +02:00
Sébastien Helleu
3045021430 core: fix cut of chars in "cutscr" of evaluated strings
This fixes two problems:
- stop before max char displayed with wide chars
- preserve combining chars in the output

Before the fix (wrong):

>> ${cutscr:3,+,こんにちは世界}
== [こん+]
>> ${cutscr:1,+,a${\u0308}}
== [a+]

After the fix (OK):

>> ${cutscr:3,+,こんにちは世界}
== [こ+]
>> ${cutscr:1,+,a${\u0308}}
== [ä]
2017-03-28 20:45:31 +02:00
Sébastien Helleu
f99c866f35 core: add cut of string with max chars displayed in evaluation of expressions
The syntax is: ${cutscr:max,suffix,string}.
The string is cut after max chars displayed on screen. If the string is cut,
the optional suffix is added after.
2017-03-27 21:14:51 +02:00
Sébastien Helleu
9a8ec36cbd core: add cut of string in evaluation of expressions
The syntax is: ${cut:max,suffix,string}.
The string is cut after max chars. If the string is cut, the optional suffix is
added after.
2017-03-25 14:19:48 +01:00
Sébastien Helleu
edfeb60e32 buflist: new plugin "buflist" (bar with list of buffers) 2017-03-25 14:18:19 +01:00
Sébastien Helleu
83117f8d2a core: add ternary operator (condition) in evaluation of expressions 2017-03-25 14:18:19 +01:00
Sébastien Helleu
07d16903f3 api: add dynamic string functions (string_dyn_*)
New functions:
- string_dyn_alloc
- string_dyn_copy
- string_dyn_concat
- string_dyn_free
2017-03-25 14:18:19 +01:00
Sébastien Helleu
705d86e684 core: update copyright dates 2017-01-01 11:32:04 +01:00
Sébastien Helleu
54841f6294 api: fix return of function string_match() when there are multiple masks in the string (issue #812)
Some tests are added as well to test the multiple masks in the string.
2016-10-02 08:58:19 +02:00
Sébastien Helleu
e218db3582 tests: add test on the "extra" option on function eval_expression() 2016-08-18 22:11:50 +02:00
Sébastien Helleu
eb86def400 core: rename function string_iconv_fprintf to string_fprintf 2016-07-09 18:28:03 +02:00
Sébastien Helleu
22c0966387 tests: add tests on function string_split_command() 2016-05-14 09:14:08 +02:00
Wojciech Kwolek
a44bcaf080 core: fix the hardcoded separator in string_split_command 2016-05-08 12:14:17 +02:00
Sébastien Helleu
50817054f9 tests: add tests on string_split() with keep_eol set to 2 2016-01-23 10:35:07 +01:00
Sébastien Helleu
3330724574 core: update copyright dates 2016-01-01 11:09:53 +01:00
Sébastien Helleu
57b6e320d3 core: fix execution of empty command name
The strings "/" and "/ " are not considered as valid commands any more.
2015-12-31 19:07:14 +01:00
Sébastien Helleu
a60075fb39 tests: temporary disable check of javascript plugin
The compilation with autotools fails to detect v8 lib (used by
javascript plugin) on Ubuntu Trusty, so the tests are failing because
javascript plugins is not loaded.

This check will be enabled again when autotools compilation will be
fixed.
2015-12-25 12:02:34 +01:00
Sébastien Helleu
6ff8de5740 tests: check if all plugins are loaded 2015-12-24 22:21:33 +01:00
Sébastien Helleu
41cb1bf635 api: fix handle of invalid escape in function string_convert_escaped_chars()
And a new test is now checking that "\" returns "".
2015-08-24 11:05:31 +02:00
Sébastien Helleu
951d1f91a4 api: add function string_hex_dump() 2015-08-22 09:30:08 +02:00
Sébastien Helleu
46a9d17ac3 api: add argument "length" in function utf8_is_valid() 2015-08-18 07:36:48 +02:00
Sébastien Helleu
4ecd8a505f api: fix type of value returned by functions utf8_prev_char, utf8_next_char and utf8_add_offset 2015-07-04 08:39:55 +02:00
Sébastien Helleu
9bf40517d3 api: add support of evaluated sub-strings and current date/time in function string_eval_expression() and command /eval 2015-06-30 20:25:35 +02:00
Sébastien Helleu
2bd2d74a07 api: add function string_eval_path_home() 2015-06-24 07:54:42 +02:00
Sébastien Helleu
d322389e04 core: add support of full color option name in command /eval and API function string_eval_expression() 2015-04-26 10:29:30 +02:00
Sébastien Helleu
b2a68af077 core: add options weechat.look.word_chars_{highlight|input} (closes #55, task #9459) 2015-04-11 18:53:44 +02:00
Sébastien Helleu
8b056d7d24 tests: check that function string_strndup returns NULL if the given string is NULL 2015-03-22 11:14:12 +01:00
Sébastien Helleu
cace7471f0 tests: remove compiler warnings about unused parameters 2015-03-06 19:24:24 +01:00
Sébastien Helleu
3eb6cd3cd9 tests: remove unused variables 2015-03-03 07:43:23 +01:00
Sébastien Helleu
f6941c20eb tests: remove unused variable 2015-03-02 21:15:23 +01:00
Sébastien Helleu
07c7ecb679 tests: add tests on weelist functions 2015-02-13 08:00:09 +01:00
Sébastien Helleu
a020c28ea6 core: update copyright dates 2015-01-01 09:23:23 +01:00
Sébastien Helleu
0cd2aff765 core: use https for WeeChat URLs 2014-12-13 09:16:09 +01:00
Sébastien Helleu
7818e08964 tests: fix compilation of tests with clang (closes #275) 2014-12-10 21:15:40 +01:00
Sébastien Helleu
b460055f78 tests: add tests of regex replace with empty regex or regex_replace 2014-11-23 08:32:52 +01:00
Sébastien Helleu
e253a2509a tests: add hashtable tests with multiple items giving same hashed key 2014-11-18 20:12:25 +01:00
Sébastien Helleu
0d1abd3899 tests: add tests of functions string_shared_get and string_shared_free 2014-11-03 20:52:02 +01:00
Sébastien Helleu
633a32ccd3 api: add regex replace feature in function string_eval_expression 2014-10-22 21:19:54 +02:00
Sébastien Helleu
5f98f20c94 tests: fix memory leak in hashtable tests 2014-10-16 20:46:31 +02:00