ZyX
933d60bc23
unittests: Do not hang when error message is too long
2017-04-01 11:07:08 +03:00
Jakob Schnitzer
8a55f9b1c8
update for changes in master; fix 'window'; tests
2017-03-31 18:30:06 +02:00
Nikolai Aleksandrovich Pavlov
a1c928e70c
ci: Do not hide ci directory ( #6410 )
2017-03-31 14:32:58 +02:00
Matthew Malcomson
3a9dd13f9e
fold.c: more edge-cases when updating ( #6207 )
...
When foldUpdateIEMSRecurse() re-uses an existing fold, it misses the
case where the existing fold spans from before startlnum to after
firstlnum, the new fold does not span this range, and there is no
"forced start" of a fold. We add a case for this in.
Ensure that if there was no forced break in folds, we merge folds that
now touch each other.
Include testing for a tricky foldmethod=expr case that has never been a
bug. This case works at the moment because of some effects that are not
obvious when reading the code.
A test for this could be useful to ensure a regression doesn't happen.
vim-patch:8.0.0408
2017-03-31 01:21:26 +02:00
Jakob Schnitzer
db095f6563
options: more tests; check first set later; stricter validation
2017-03-30 23:04:54 +02:00
Jakob Schnitzer
44f039a1c8
options: fix setglobal for buf-local number options
2017-03-30 23:04:54 +02:00
Jakob Schnitzer
628d0335b8
options: add some tests
2017-03-30 23:04:54 +02:00
Jakob Schnitzer
e47622f26b
options: setlocal should only set local value
...
For 'iminsert' and 'imsearch' the global value was always changed.
2017-03-30 23:04:54 +02:00
Jakob Schnitzer
eb0e94f71b
api: {get,set}_option should {get,set} global value of local options ( #6405 )
...
- nvim_get_option should return the global default of a local option.
- nvim_set_option should set the global default of a local option.
2017-03-30 22:03:52 +02:00
Matthew Malcomson
66b336d89b
test: set 'nomore' by default ( #6360 )
...
Escaping from a '-- More --' prompt in tests is awkward as it doesn't
take keys from the typebuffer, requiring a call to `feed()` in lua at
the correct time. Moreover, it's rarer that a test will want the
'-- More --' prompt to be activated than not.
2017-03-30 19:00:34 +02:00
Justin M. Keyes
1ea9ebf112
test: Use workspace-local temp directory.
...
Closes #6291
2017-03-30 02:55:00 +02:00
ZyX
46efe14473
functests: Try sleeping a bit more
2017-03-29 10:08:46 +03:00
ZyX
114eaa15f0
eval/typval,api/buffer: Fix review comments
2017-03-29 10:08:46 +03:00
ZyX
58e34e8d99
eval/typval: Allow NULL dict as tv_dict_get_callback() argument
...
Also removes NULL key input: tv_dict_find() does not allow this.
2017-03-29 10:08:46 +03:00
ZyX
8daf756fb6
unittests: Fix linter errors
2017-03-29 10:08:46 +03:00
ZyX
7826ee1c03
unittests: Add tv_get_string* tests
2017-03-29 10:08:46 +03:00
ZyX
e08b27ba4a
unittests: Add tv_get number tests
2017-03-29 10:08:46 +03:00
ZyX
4536c064e4
unittests: Move tv_dict_add* tests to a proper describe() block
2017-03-29 10:08:46 +03:00
ZyX
49195063fd
unittests: Add tv_check… tests
2017-03-29 10:08:46 +03:00
ZyX
389274bef7
unittests: Add tv_equal() tests
2017-03-29 10:08:46 +03:00
ZyX
630ff33dc1
unittests: Test locks section
2017-03-29 10:08:46 +03:00
ZyX
ed4948a933
unittests: Test tv_copy()
2017-03-29 10:08:46 +03:00
ZyX
f0bbd1e825
unittests: Add tests for tv_clear()
2017-03-29 10:08:46 +03:00
ZyX
e43de6bb3e
unittests: Add test for tv_dict_set_keys_readonly
2017-03-29 10:08:45 +03:00
ZyX
368a61c525
unittests: Add tv_dict_copy tests
2017-03-29 10:08:45 +03:00
ZyX
8b9a1fbf7a
unittests: Add tests for tv_dict_extend
2017-03-29 10:08:45 +03:00
ZyX
fa852e7cdc
eval: Fix extend() behaviour with NULL lists and dictionaries
...
Ref #4615
Ref vim/vim#768
2017-03-29 10:08:45 +03:00
ZyX
4987850cac
unittests: Add tv_dict_clear tests
2017-03-29 10:08:45 +03:00
ZyX
270a3889af
unittests: Add tv_dict_add* unit tests
...
Also fixes incorrect location of `tv_dict_add` function and three bugs in other
functions:
1. `tv_dict_add_list` may free list it does not own (vim/vim#1555 ).
2. `tv_dict_add_dict` may free dictionary it does not own (vim/vim#1555 ).
3. `tv_dict_add_dict` ignores `key_len` argument.
2017-03-29 10:08:45 +03:00
ZyX
bc87d23c28
unittests: Add tests for dictionary indexing
2017-03-29 10:08:45 +03:00
ZyX
5ce6243241
unittests: Enable tv_list_join tests back
...
Unable to reproduce the problem on Mac OS X Sierra VPS, need to check whether it
is reproducible on travis.
2017-03-29 10:08:45 +03:00
ZyX
52e226ff74
unittests: Disable tv_list_join test on Mac OS only
2017-03-29 10:08:45 +03:00
ZyX
38dd81c136
eval/typval: Fix SEGV in test_alot.vim test
2017-03-29 10:08:45 +03:00
ZyX
6c622ed08b
unittests: Add tv_dict_item_{add,remove} tests
2017-03-29 10:08:45 +03:00
ZyX
ffaf7c7521
unittests: Add tv_dict_item_{alloc,free} tests
2017-03-29 10:08:45 +03:00
ZyX
cdb1aa3e47
eval: Fix len argument to xstrlcat
2017-03-29 10:08:45 +03:00
ZyX
4c3be98db9
unittests: Add tv_dict_watcher_{add,remove} tests
2017-03-29 10:08:45 +03:00
ZyX
140174669e
unittests: Run tv_list_join tests in case it stopped failing
2017-03-29 10:08:45 +03:00
ZyX
3025431c81
eval: Make sure that v:_null_dict does not crash dictwatcher*()
...
Ref #4615
2017-03-29 10:08:44 +03:00
ZyX
1e3e302dc2
eval: Move part of dictwatcher* functions to eval/typval
2017-03-29 10:08:44 +03:00
ZyX
5239616297
functests: Fix buf_functions test on Windows
2017-03-29 10:08:44 +03:00
ZyX
4bcee96347
*: Fix some Windows-specific warnings
...
Also fixed an error in path_fnamecmp().
2017-03-29 10:08:42 +03:00
ZyX
56e51033ab
unittests: Add tests for tv_list_idx_of_item
2017-03-29 10:08:06 +03:00
ZyX
e5edf07ec4
unittests: Add tests for tv_list_find*() functions
...
Additional modifications:
- More `const` qualifiers in tested functions.
- `tv_list_find_str()` second argument is more in-line with other
`tv_list_find*()` functions.
2017-03-29 10:08:06 +03:00
ZyX
b3672ae2fc
eval/typval: Add tv_list_equal() tests, compare NULL lists equal
2017-03-29 10:08:06 +03:00
ZyX
4f9e784427
unittests: Test tv_list_join()
2017-03-29 10:08:06 +03:00
ZyX
cf45c7bb05
unittests: Fix tests crash
...
Tests crash at some point without
- `after_each(collectgarbage)` right before “typval.c list copy() copies list
correctly and converts items” test.
- Commenting out that test.
- Adding `collectgarbage()` after the test (what actually this commit does).
Adding `collectgarbage()` to top-level `after_each` block right after
`restore_allocators` makes running this file crash even if it is run alone.
2017-03-29 10:08:06 +03:00
ZyX
7ceebacb3f
eval/typval,tests: Fix extending list with itself, add tests
...
Adds unit test for tv_list_extend and regression test for extend() VimL
function.
2017-03-29 10:08:06 +03:00
ZyX
56e4c2f67e
unittests: Test tv_list_concat()
2017-03-29 10:08:06 +03:00
ZyX
f80a00469f
eval/typval: Make tv_list_concat handle NULL lists correctly
...
Fixes some FIXMEs in eval/null_spec.lua.
2017-03-29 10:08:06 +03:00