ZyX
933d60bc23
unittests: Do not hang when error message is too long
2017-04-01 11:07:08 +03:00
Nikolai Aleksandrovich Pavlov
a1c928e70c
ci: Do not hide ci directory ( #6410 )
2017-03-31 14:32:58 +02:00
ZyX
bc87d23c28
unittests: Add tests for dictionary indexing
2017-03-29 10:08:45 +03:00
ZyX
48e7a83447
unittests: Fix linter error
2017-03-12 04:20:31 +03:00
ZyX
d559fe6e93
unittests: Allow running ffi.cdef
in the main process
2017-03-12 03:14:34 +03:00
ZyX
a7f64ba517
unittests: Move filtering cdefs to main process
2017-03-12 03:02:14 +03:00
ZyX
bf68907778
unittests: Use more adequate names for some functions
2017-03-12 02:54:23 +03:00
ZyX
8ef6cfa6ac
unittests: Fix linter errors
2017-03-11 23:48:16 +03:00
ZyX
ec730daee9
unittests: Do not use which, add data to paths.lua.in instead
2017-03-11 23:23:50 +03:00
ZyX
ce12bda712
unittests: Always close all pipes
2017-03-11 23:23:49 +03:00
ZyX
e2a578f40d
unittests: Do not import libnvim or headers in main process
...
Slows down unit tests much, but gets rid of as much preserved state as possible.
2017-03-11 23:23:49 +03:00
ZyX
9400466282
unittests: Check core dumps in after_each, like in functests
2017-03-11 23:23:49 +03:00
ZyX
5898b42d82
unittests: Do not run failing test at all
2017-03-11 23:23:30 +03:00
ZyX
29ed5b3a39
unittests: Fix lint errors
2017-03-11 23:23:30 +03:00
ZyX
b442574862
unittests: Allow failing test to fail
2017-03-11 23:23:30 +03:00
ZyX
ff5dca6630
unittests: Log syscalls if requested
2017-03-11 23:23:30 +03:00
ZyX
1edb3ccc36
unittests: Use own bindings to libc syscall wrappers
2017-03-11 23:23:30 +03:00
ZyX
3adecd3ede
unittests: Do not use syscall library: does not work well with cimport
2017-03-11 23:23:30 +03:00
ZyX
9f29a76cab
unittests: Try using syscall library instead (ffi-based)
2017-03-11 23:23:30 +03:00
ZyX
b92d6aaf0d
unittests: Pause garbage collector while executing tests
...
Temporary (?) workaround for currently failing check_alloc_log tests.
2017-03-11 23:23:30 +03:00
ZyX
82e5af85c1
unittests: Run tests in a separate process
2017-03-11 23:23:30 +03:00
ZyX
77ebe85be6
buffer: Hide one of the asserts from lua parser
2017-02-25 00:22:46 +03:00
ZyX
3967618fa5
unittest: Fix linter errors
2017-01-07 19:12:18 +03:00
ZyX
8fd3d31329
unittest: Allow mocking allocator calls
2017-01-07 14:48:21 +03:00
James McCoy
b4c0c61f5c
Merge pull request #5826 from ZyX-I/fix-typval_encode
...
Refactor eval/typval_encode.h
2017-01-06 21:11:33 -05:00
ZyX
937b6fac8f
unittest: Fix linter errors
2017-01-03 22:54:55 +03:00
ZyX
2151ddbd73
unittest: Move nil checks to Gcc:preprocess
2017-01-03 22:54:54 +03:00
ZyX
0d7b779cab
unittest: Record previous defines in another place
...
Previous commit made preprocess.lua know how its output will be used. This moves
state to cimport, making only it know which is cleaner.
2017-01-03 22:54:54 +03:00
ZyX
410d18ef5c
unittest: Allow multiple indirect includes
...
Works by saving all preprocessor defines and reusing them on each run. This also
saves NVIM_HEADER_H defines. Saving other defines is needed for defines like
`Map(foo, bar)` which are sometimes used to declare types or functions. Saving
types or function declarations is not needed because they are recorded as luajit
state.
Fixes #5857
2017-01-03 22:54:54 +03:00
ZyX
136b382e64
tests: Add tests for partials dumping
...
Also fixed dumping of partials by encode_vim_to_object and added code which is
able to work with partials and dictionaries to test/unit/eval/helpers.lua
(mostly copied from #5119 , except for partials handling).
2017-01-03 22:51:29 +03:00
Marco Hinz
d2998a0a49
Tests: make unit tests work on macOS Sierra
...
Fixes #5455 .
2016-12-29 02:58:21 +01:00
ZyX
fec7983ecd
unittests: Add tests for file.c
...
Also fixes some errors found.
2016-06-24 00:07:54 +03:00
ZyX
ff470bb853
functests: Check logs in lua code
...
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.
2016-06-10 21:50:49 +03:00
Justin M. Keyes
49c5689f45
test/unit: ensure event_init()
...
Closes #4635
References #4630
References https://github.com/neovim/neovim/pull/4070#discussion_r50626558
2016-04-25 00:42:44 -04:00
ZyX
77776b09c6
eval/encode: Fix writing strings starting with NL to list
...
Error [found][1] by oni-link.
[1]: https://github.com/neovim/neovim/pull/4131/files#r52239384
2016-04-18 02:47:13 +03:00
Marco Hinz
32ecd75a16
test/unit: clean up according to luacheck
2015-11-23 13:57:21 +01:00
Thiago de Arruda
c8c5af5a7a
test: Ensure proper initialization in unit/helpers.lua
...
Remove helpers.vim_init and simply perform the required initialization in
helpers.lua.
2015-07-01 05:40:53 -03:00
John Szakmeister
235909044a
tests: require luassert in the helpers
...
This is necessary for newer versions of Busted, otherwise assert will be
nil and the tests will die.
Note: this does not mean the tests now work with the latest Busted.
There are still several issues preventing that from happening.
2015-03-01 09:00:27 -05:00
Scott Prager
275f6e3a6b
mch_early_init() -> early_init().
...
Move general initialization functions to early_init, which simplifies
test/unit/helpers.lua, which requires all these functions.
2014-11-28 14:27:58 -05:00
Stefan Hoffmann
972fc30599
unittest: increase number of retries in cimport
2014-10-30 19:05:39 +01:00
Stefan Hoffmann
741cb5be08
unittest: fix handling of pragma pack in cimport
2014-10-30 19:05:39 +01:00
Justin M. Keyes
99a9161bac
unit tests: initialize everything
2014-09-11 08:58:17 +00:00
Justin M. Keyes
f6088e79b0
unit tests: avoid global scope; add missing cimports
...
temporarily comment out call to vim_deltempdir() to avoid segfault
2014-09-11 05:17:52 +00:00
Justin M. Keyes
c76feb338a
unit tests: helpers.lua: hack to avoid empty popen() result
2014-09-11 05:17:52 +00:00
Thiago de Arruda
dcda179e6a
unittest: convert helpers.moon to lua
2014-08-31 14:50:49 +02:00