21 Commits

Author SHA1 Message Date
Sébastien Helleu
e8af853624 tests: add scripting API tests (issue #104)
Automatic tests of scripting API are made with Python scripts:

- unparse.py: convert Python code to other languages
- testapigen.py: generate scripts in all languages to test the API
- testapi.py scripting API tests
2017-10-07 16:51:25 +02:00
Sébastien Helleu
137d5863e2 tests: run command "/debug libs" in tests instead of Travis CI command 2017-10-01 08:00:39 +02:00
Sébastien Helleu
16661b0cbe tests: display an error if the required locale en_US.UTF-8 is not installed 2017-07-23 15:12:40 +02:00
Sébastien Helleu
8efbf61e66 tests: fix load of plugins in tests after a build with autotools 2017-07-05 21:33:19 +02:00
Linus Heckemann
d6c1d02eca core: search WEECHAT_EXTRA_LIBDIR for plugins (closes #971, issue #979)
In addition to searching the statically configured WEECHAT_LIBDIR
(weechat's installation directory) for plugins, search the path
given in the environment variable WEECHAT_EXTRA_LIBDIR. This makes
departing from the FHS standard while keeping the plugins packaged
separately easier. This change was made specifically with the Nix
package manager in mind, but can easily be used by others.
2017-07-05 19:52:48 +02:00
Sébastien Helleu
5e48b50da8 tests: fix double load of plugins when "make install" is executed before tests 2017-07-05 19:41:11 +02:00
Sébastien Helleu
a59ce8331a tests: load plugins from build directory instead of installed libdir
This allows to run tests without running "make install".
2017-07-04 22:14:44 +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
705d86e684 core: update copyright dates 2017-01-01 11:32:04 +01:00
Sébastien Helleu
cf6aca1619 core: add pointer in some callbacks (closes #406)
This pointer is the first argument received by callbacks, and the
existing argument "data" is now automatically freed by WeeChat when the
object containing the callback is removed.

With this new pointer, the linked list of callbacks in scripts has been
removed. This will improve speed of scripts (using a lot of hooks),
reduce memory used by scripts and reduce time to unload scripts.

Following functions are affected in the C API:

* exec_on_files
* config_new
* config_new_section
* config_new_option
* hook_command
* hook_command_run
* hook_timer
* hook_fd
* hook_process
* hook_process_hashtable
* hook_connect
* hook_print
* hook_signal
* hook_hsignal
* hook_config
* hook_completion
* hook_modifier
* hook_info
* hook_info_hashtable
* hook_infolist
* hook_hdata
* hook_focus
* unhook_all_plugin
* buffer_new
* bar_item_new
* upgrade_new
* upgrade_read
2016-03-21 18:11:21 +01:00
Sébastien Helleu
3330724574 core: update copyright dates 2016-01-01 11:09:53 +01:00
Sébastien Helleu
415dea5c74 tests: fix locale used to execute tests 2015-12-24 22:48:10 +01:00
Sébastien Helleu
6ff8de5740 tests: check if all plugins are loaded 2015-12-24 22:21:33 +01:00
Sébastien Helleu
a020c28ea6 core: update copyright dates 2015-01-01 09:23:23 +01:00
Sébastien Helleu
dda1a66fd7 tests: add tests of arraylist functions 2014-09-01 11:51:04 +02:00
Sébastien Helleu
f39b37351c tests: fix build of tests when the build directory is outside source tree (closes #178) 2014-08-25 07:38:38 +02:00
Sébastien Helleu
bc34c3cfc2 tests: fix memory leak in tests launcher 2014-08-15 15:08:31 +02:00
Sébastien Helleu
dcf46a2ca0 tests: read WeeChat command line arguments in environment variable "WEECHAT_TESTS_ARGS" 2014-08-14 19:15:25 +02:00
Sébastien Helleu
f9b04635d3 tests: fix compilation of tests
The header gui-curses.h doesn't need to be included (this causes an error
because the real ncurses lib header is not found when compiling tests).
2014-08-02 11:38:58 +02:00
Sébastien Helleu
29385e39be tests: fix compilation warning with autotools 2014-07-21 21:25:55 +02:00
Sébastien Helleu
db9a8e7bc4 tests: add unit tests using CppUTest
The tests can be run only via CMake:

  1. build with tests: cmake .. -DENABLE_TESTS=ON
  2. make
  3. ctest  (or ctest -V for verbose output)
2014-07-20 12:13:25 +02:00