ZyX
9b8beaff02
unittests: Add tests for tv_list_insert*()/…append*() functions
2017-03-29 10:08:06 +03:00
ZyX
be360d8841
unittests: Add tests for tv_list_insert()
2017-03-29 10:08:06 +03:00
ZyX
d2639e1e1d
unittests: Add tests for list watchers and list alloc/free/unref
2017-03-29 10:08:06 +03:00
ZyX
a394167177
unittests: Test tv_list_item_\* functions
...
To check that memory is free()d correctly.
2017-03-29 10:08:06 +03:00
ZyX
2ad4fba46d
eval: Move copy_tv to eval/typval
2017-03-29 10:08:06 +03:00
ZyX
5df35297f8
eval: Remove eval_expr() completely
2017-03-29 10:08:05 +03:00
ZyX
e18a578308
*: Move some dictionary functions to typval.h and use char*
...
Also fixes buffer reusage in setmatches() and complete().
2017-03-29 10:07:42 +03:00
ZyX
fb146e80aa
eval: Split eval.c into smaller files
2017-03-29 10:05:06 +03:00
Justin M. Keyes
e20e9645b2
build: Rename NEOVIM_* to NVIM_*
2017-03-27 14:27:20 +02:00
ZyX
ae4fae9d3e
unittests: Add tests for new fileio functions
2017-03-19 19:16:44 +03:00
ZyX
e78e75d85d
fileio,main: Do not restart syscall at EAGAIN when reading for -s
2017-03-19 17:29:48 +03:00
ZyX
fdfa1ed578
main: Temporary fix assertion error
...
This variant uses `fdopen()` which is not standard, but it fixes problem on my
system. In next commit `scriptin` will use `FileDescriptor*` from os/fileio in
place of `FILE*`.
2017-03-19 16:09:48 +03:00
ZyX
3cd7bf31e2
tests: Fix repeated_popen_r usage, rename the function
2017-03-19 14:13:21 +03:00
ZyX
0e9286a19e
tests: Fix CI failures
2017-03-19 14:13:21 +03:00
ZyX
0320a58082
functests: Check that -s works as expected
2017-03-19 14:13:21 +03:00
John Szakmeister
3c8d974f73
unittests: avoid using pattern matching on file names
...
The directory name could contain special characters that trips up the
matching used by find. Instead, let's just make sure that the filename
starts with the directory name.
2017-03-16 06:58:15 -04: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
a54be846cf
unittests: Update test/unit/message_spec.lua
2017-03-11 23:26:33 +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
12b062b2c8
unittests: Run all unit tests in their own processes
...
Used
sed -r -i -e '/ helpers =/ s/$/\nlocal itp = helpers.gen_itp(it)/; s/^(\s*)it\(/\1itp(/' test/unit/**/*_spec.lua
to alter all tests. Locally they all run fine now.
Reasoning:
1. General: state from one test should not affect other tests.
2. Local: travis build is failing with something which may be an output of
garbage collector. This should prevent state of the garbage collector from
interferring as well.
2017-03-11 23:23:30 +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
James McCoy
4e3a2784ec
vim-patch:7.4.2068
...
Problem: Not all arguments of trunc_string() are tested. Memory access
error when running the message tests.
Solution: Add another test case. (Yegappan Lakshmanan) Make it easy to run
unittests with valgrind. Fix the access error.
https://github.com/vim/vim/commit/b9644433d2728e99fab874e5e33147ad95d23a31
2017-03-06 15:36:09 -05:00
James McCoy
7217360e34
vim-patch:7.4.2051
...
Problem: No proper testing of trunc_string().
Solution: Add a unittest for message.c.
https://github.com/vim/vim/commit/502ae4ba63561c98ac69af26cd9883bfd18d225f
2017-03-06 15:09:40 -05:00
Justin M. Keyes
4306e5ae0c
test: luacheck update
...
We pull luacheck HEAD, so this is a "catch up" commit to fix
newly-discovered errors.
2017-03-01 14:47:49 +01:00
ZyX
77ebe85be6
buffer: Hide one of the asserts from lua parser
2017-02-25 00:22:46 +03:00
Nikolai Aleksandrovich Pavlov
64c375c589
unittest: Filter out standard defines so that they do not spam stderr ( #6113 )
2017-02-15 01:21:06 +01:00
Justin M. Keyes
bbfdb84ae1
build: Do not force busted into front of $PATH
...
This was a workaround from long ago, but it doesn't seem to be needed
anymore. And it breaks the $PATH on the Windows build (AppVeyor CI).
After this change python3 (and 2) is correctly detected on AppVeyor CI.
References #5946
2017-02-04 11:07:49 +01:00
Justin M. Keyes
224f99b85d
win: Append process dir to $PATH
...
This allows executables to be found by :!, system(), and executable() if
they live next to ("sibling" to) nvim.exe. This is what gvim on Windows
does, and also matches the behavior of Win32 SearchPath().
https://github.com/vim/vim/blob/c4a249a736d40ec54794827ef95804c225d0e38f/src/os_win32.c#L354-L370
2017-02-04 11:07:49 +01:00
Justin M. Keyes
88bc9f8e92
xstrlcat: Allow overlapped pointers. ( #6017 )
...
memcpy is not equivalent to memmove (which is used by vim_strcat), this
could cause subtle bugs if xstrlcat is used as a replacement for
vim_strcat. But vim_strcat is inconsistent: in the `else` branch it uses
strcpy, which doesn't allow overlap.
Helped-by: oni-link <knil.ino@gmail.com >
Helped-by: James McCoy <jamessan@jamessan.com >
Helped-by: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru >
2017-01-31 17:42:22 +01:00
Justin M. Keyes
497db001df
test: expand_env_esc()
...
Test expand_env_esc() using the same parameters reported in #3725 .
Closes #3725
2017-01-21 18:17:44 +01:00
ZyX
3967618fa5
unittest: Fix linter errors
2017-01-07 19:12:18 +03:00
ZyX
dea4bb33dc
unittest,memory: Fix tests
2017-01-07 19:07:32 +03:00
ZyX
88a4820cc9
unittest: Add failing test for freeing dictionaries in a list
2017-01-07 15:54:55 +03:00
ZyX
728367a196
unittest: Add dict_items function
2017-01-07 15:54:55 +03:00
ZyX
41cbb7891d
unittest: Add failing test of freeing lists
2017-01-07 14:48:21 +03:00