Commit Graph

804 Commits

Author SHA1 Message Date
Justin M. Keyes
8641e3a156 test: TUI colors: Skip TERM=linux on non-linux. (#5015)
Also skip TERM=screen (GNU, so probably not common on BSD)
2016-07-06 09:11:26 -04:00
Justin M. Keyes
086aa99292 test/functional: sleep() 2016-07-03 02:22:55 -04:00
Justin M. Keyes
173d366a5b test: TUI colors ('t_Co') 2016-07-03 01:29:00 -04:00
prollings
f80eb768c7 vim-patch:7.4.1121 (#4989)
Problem:    test_expand leaves files behind.
Solution:   Edit another file before deleting, otherwise the swap file
            remains.

08b270a8a4
2016-07-02 20:22:59 -04:00
Marco Hinz
0d9593ff14 Tests: check 'autochdir' on startup 2016-07-02 01:03:05 +02:00
Björn Linse
6f4f654231 Merge pull request #4880 from bfredl/zerotimer
make timers work correctly when timeout or repeat is zero
2016-07-01 17:34:28 +02:00
KillTheMule
c8da12b9a6 Add test for :drop
Cf. https://github.com/neovim/neovim/pull/4995
2016-07-01 15:25:49 +02:00
Patrick
8e804c911e vim-patch:7.4.1136
Problem:    Wrong argument to assert_exception() causes a crash. (reported by
            Coverity)
Solution:   Check for NULL pointer.  Add a test.

da5dcd9366
2016-06-30 22:35:06 +10:00
Björn Linse
5c754a2d22 timers: make repeat=0 work one-shot (consistent with vim) 2016-06-29 18:57:18 +02:00
Björn Linse
2c39e0b03f timers: make timers work with zero timeout 2016-06-29 18:57:18 +02:00
Justin M. Keyes
204f557a11 Merge #4984 'Trigger TabNewEntered with <CTRL-W>T'
Closes #4979
2016-06-28 05:00:54 -04:00
Dimitri Merejkowsky
43536568ba [RFC] Fix #4979: Trigger TabNewEntered also with <CTRL-W>T
Original patch by @fmoralesc
2016-06-28 23:50:05 +02:00
ZyX
0d56118d86 msgpack_rpc: Fix crash in log_server_msg
It appears that used msgpack library is not able to parse back message created 
by msgpack_rpc_from_object() if nesting level is too high, so log_server_msg now 
cares about msgpack_unpack_next() return value. Also error message from 
server_notifications_spec.lua is not readable if something is wrong (though at 
least now it does not crash when parsing deeply nested structures).

log_server_msg() in the test reports

    [msgpack-rpc] nvim -> client(1) [error]        "parse error"
2016-06-24 16:53:26 +03:00
ZyX
90b8cf133e msgpack_rpc: Also make msgpack_from_*/msgpack_to_* functions not recur
This removes some stack overflows in new test regarding deeply nested variables.
Now in place of crashing vim_to_object/msgpack_rpc_from_object/etc it crashes
clear_tv with stack overflow.
2016-06-24 16:53:26 +03:00
ZyX
da15b5c1f3 api/helpers: Use typval_encode.h for vim_to_object
This ought to prevent stack overflow, but I do not see this actually working:
*lua* code crashes with stack overflow when trying to deserialize msgpack from
Neovim, Neovim is fine even if nesting level is increased 100x (though test
becomes very slow); not sure how recursive function may survive this. So it
looks like there are currently only two positive effects:

1. NULL lists are returned as empty (#4596).
2. Functional tests are slightly more fast. Very slightly. Checked for Release
   build for test/functional/eval tests because benchmarking of debug mode is
   not very useful.
2016-06-24 16:53:26 +03:00
Björn Linse
e8a8342132 test: fix command_count_spec
The test hit wait_return if x or .x.swp exists in the project root directory.
2016-06-23 16:54:19 +02:00
James McCoy
cde1d818d0 vim-patch:7.4.1592
Problem:    Quickfix code using memory after being freed. (Dominique Pelle)
Solution:   Detect that the window was closed. (Hirohito Higashi)

0899d69803
2016-06-22 21:10:07 -04:00
Marco Hinz
1a8d9e9d54 Add tests for new feature 2016-06-20 23:10:46 +02:00
Marco Hinz
a05e7a6bca Make existing tests work with new feature 2016-06-20 23:10:41 +02:00
Justin M. Keyes
7df9dd33a1 Merge #4933 from ZyX-I/fix-matchparen-spec
Make matchparen_spec.lua fail if matchparen is not available
2016-06-20 01:30:59 -04:00
Justin M. Keyes
8a4e5b4bc2 Merge #4697 'capture() function'. 2016-06-20 00:55:41 -04:00
Justin M. Keyes
abeb2f020f test/highlight_spec: Test "gui" arg of synIDattr().
Also use less "regular" values for cterm colors.
2016-06-18 13:07:59 -04:00
Rom Grk
86b138b25d synIDattr(): return RRGGBB value for [fg|bg|sp]# #4851
add tests for synIDattr() with [fg|bg|sp]#

add tests for synIDattr and various #RGB colors

synIDattr: test for ui_rgb_attached()

test: fix tests for synIDattr fg/bg/sp
2016-06-18 12:25:11 -04:00
ZyX
2126ec0c5b functests: Fix matchparen_spec.lua 2016-06-17 20:38:03 +03:00
Björn Linse
16424caeda eval: add api_info()
Previously, the api metadata was only accessible frow within nvim as
msgpackparse(systemlist('nvim --api-info'))[0]
2016-06-17 18:47:45 +02:00
James McCoy
0d3ff4b55d vim-patch:7.4.1126
Problem:    Can only get the directory of the current window.
Solution:   Add window and tab arguments to getcwd() and haslocaldir().
            (Thinca, Hirohito Higashi)

c970330676
2016-06-15 18:04:05 -04:00
James McCoy
d45a665b00 test: functional: Remove unnecessary use of clipboard register
menu_spec.lua yanks to the clipboard, but never pastes from it.  This
can leave a child xsel process waiting around for something to paste the
content, causing the test process to hang.

Since the test isn't explicitly trying to exercise the clipboard, simply
use the default register.
2016-06-15 09:54:27 -04:00
James McCoy
bec5fd5809 test: functional: Remove test_bkc_* files after testing 2016-06-15 09:54:22 -04:00
James McCoy
e7ab3e7e59 test: Use clipboard fixture instead of user's clipboard (#4903) 2016-06-11 12:58:57 -04:00
ZyX
6881fcd203 functests: Do not use setup/teardown where before_/after_each is needed
When skipping these test blocks they may error out:

    Error → test/functional/shell/viml_system_spec.lua @ 154
    system() with output containing NULs setup
    ./test/functional/helpers.lua:75: attempt to index upvalue 'session' (a nil value)

    stack traceback:
            ./test/functional/helpers.lua:75: in function 'request'
            ./test/functional/helpers.lua:166: in function 'nvim_feed'
            ./test/functional/helpers.lua:195: in function 'feed'
            test/functional/shell/viml_system_spec.lua:14: in function <test/functional/shell/viml_system_spec.lua:13>

    Error → test/functional/shell/viml_system_spec.lua @ 155
    system() with output containing NULs teardown
    ./test/functional/helpers.lua:75: attempt to index upvalue 'session' (a nil value)

    stack traceback:
            ./test/functional/helpers.lua:75: in function 'eval'
            test/functional/shell/viml_system_spec.lua:21: in function <test/functional/shell/viml_system_spec.lua:20>
2016-06-10 21:50:50 +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
a160590e40 Merge #4813 'runtime: clipboard: start daemons in /'. 2016-06-10 03:05:28 -04:00
James McCoy
56e9e81115 Merge pull request #4738 from brcolow/vim-7.4.1223
vim-patch:7.4.1223
2016-06-09 21:18:29 -04:00
Michael Ennen
b1c9d7d237 vim-patch:7.4.1223
Problem:    Crash when setting v:errors to a number.
Solution:   Free the typval without assuming its type. (Yasuhiro Matsumoto)

a542c680a8
2016-06-09 21:18:09 -04:00
Jurica Bradaric
6c550a4f13 vim-patch:7.4.1468
Problem:    Sort test doesn't test with "1" argument.
Solution:   Also test ignore-case sorting. (Yasuhiro Matsumoto)

51d1d53680
2016-06-09 20:34:43 +02:00
Jurica Bradaric
b2d15fbebc vim-patch:7.4.1464
Problem:    When the argument of sort() is zero or empty it fails.
Solution:   Make zero work as documented. (suggested by Yasuhiro Matsumoto)

5131c144fe
2016-06-09 20:34:43 +02:00
Jurica Bradaric
82da7eed34 vim-patch:7.4.1397
Problem:    Sort test fails on MS-Windows.
Solution:   Correct the compare function.

0bb6108eb4
2016-06-09 20:34:43 +02:00
Jurica Bradaric
81b9b37e01 vim-patch:7.4.1394
Problem:    Can't sort inside a sort function.
Solution:   Use a struct to store the sort parameters. (Jacob Niehus)

0b962473dd
2016-06-09 20:34:43 +02:00
Michael Ennen
06bbb79e63 vim-patch:7.4.1153
Problem:    Autocommands triggered by quickfix cannot always get the current
            title value.
Solution:   Call qf_fill_buffer() later. (Christian Brabandt)

6920c72d4d

Helped by @mhinz
2016-06-09 11:12:51 +02:00
Lucas Hoffmann
38d98bba68 tests: Migrate legacy test 34. (#2849) 2016-06-08 00:25:53 -04:00
James McCoy
15afd30e04 test: Fix path to valgrind suppressions (#4892) 2016-06-08 00:24:23 -04:00
Aleksa Sarai
1bb8930c92 test: add tests for cwd handling
Add both a test for cwd=/ and cwd=/tmp/nvim.XXXXX, to make sure that we
don't have regressions in cwd handling.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2016-06-07 17:26:49 +10:00
Justin M. Keyes
234346312e test: expand_spec: clean up fixtures 2016-06-06 11:04:09 -04:00
Justin M. Keyes
5f5f2d8945 test: rmdir(): recursively delete 2016-06-06 11:04:09 -04:00
KillTheMule
999590b313 Testlint. (#4881) 2016-06-05 08:26:47 -04:00
Justin M. Keyes
d97a97d7e8 Merge pull request #4879 from justinmk/test55
tests: Migrate legacy test 55
2016-06-05 04:42:46 -04:00
KillTheMule
5a387dddc6 Fix indents. 2016-06-05 04:26:33 -04:00
KillTheMule
dfaf720442 Testlinting. 2016-06-05 04:26:18 -04:00
Justin M. Keyes
c156a18280 Merge pull request #2844 from lucc/test10
tests: migrate legacy test 10
2016-06-05 04:22:52 -04:00
Justin M. Keyes
02e6914a93 Merge pull request #4860 from jamessan/tab-win-precedence
tcd: Determine correct scope from user input
2016-06-04 11:05:05 -04:00