Commit Graph

93 Commits

Author SHA1 Message Date
Florian Walch
183b4b60b6 vim-patch:750a698
Add new files for 7.4.549.

https://code.google.com/p/vim/source/detail?r=750a6986aa86a2bb3346631a353913b899d86748
2014-12-27 13:16:54 +01:00
Florian Walch
e06159e6ae vim-patch:7.4.488
Problem:    test_mapping fails for some people.
Solution:   Set the 'encoding' option. (Ken Takata)

https://code.google.com/p/vim/source/detail?r=v7-4-488
2014-12-23 21:23:49 +01:00
Florian Walch
6aecbbebfd vim-patch:7.4.483
Problem:    A 0x80 byte is not handled correctly in abbreviations.
Solution:   Unescape special characters. Add a test. (Christian Brabandt)

https://code.google.com/p/vim/source/detail?r=v7-4-483
2014-12-23 21:23:32 +01:00
Julian Mehne
84dda11ec3 Remove superfluous settings from legacy tests. 2014-12-18 00:50:17 +01:00
Thiago de Arruda
40977e78a2 input: Recognize mouse events for abstract_ui 2014-12-10 07:51:06 -03:00
Michael Reed
365cf90efb docs: Remove EBCDIC remnants 2014-12-09 19:25:07 -05:00
Thiago de Arruda
1192fbd08a test: Add screen test facility
- Add screen.lua which implements a remote screen to verify screen state by
  tests under functional/ui
- Add some basic screen/highlight tests
2014-12-09 08:36:16 -03:00
Björn Linse
6ddbe6d9be clipboard: fix let @+ = ... and add test 2014-12-08 22:05:05 +01:00
Björn Linse
d9639d3a9b clipboard: add functional test 2014-12-08 22:05:05 +01:00
Justin M. Keyes
01fc0efdca Merge pull request #1341 from splinterofchaos/api-nul
Api: Improve Nul handling
2014-12-06 20:19:08 -05:00
Scott Prager
cea5092f40 api: Add tests for when not to handle NULs. 2014-12-06 17:29:39 -05:00
Scott Prager
460843b4cd api: Handle NULs and newlines in buffer_*_line. 2014-12-06 17:29:38 -05:00
Julian Mehne
42891ea9d9 Make migrated test33 more similar to old legacy test.
Remove `expandtab` and add a missing trailing space from the legacy test.
2014-12-06 13:43:14 +01:00
Thiago de Arruda
a31b06c44d deps: Update lua client 2014-12-05 14:23:37 -03:00
Björn Linse
b3151af69c systemlist: test empty lines in beginning and middle of output 2014-12-02 16:53:16 +01:00
Björn Linse
1464b0eda2 systemlist: add keepempty option to preserve final newline 2014-12-02 16:50:52 +01:00
Rui Abreu Ferreira
84eb118f62 Functional tests for feedkeys CSI escaping
- tests for vim_feedkeys and replace_termcodes
2014-11-27 08:33:53 -03:00
John Szakmeister
78618d742b Avoid printing an error response when detecting xclip.
While we're at, using the slightly more portable `command -v` technique
to detect the executable.  Also, there's no need to use `io.popen()` if
we aren't going to record the path.  Instead, let's use the simpler
`os.execute()` to detect the presence of xclip.
2014-11-26 17:31:51 -05:00
Justin M. Keyes
c83dfa20bd Merge pull request #1543 from jszakmeister/fix-broken-functional-tests
Fix broken functional test.
2014-11-25 17:06:53 -05:00
Thiago de Arruda
99809903bb deps: Update bundled lua client version
The new version fixes defunct processes which causes random test failures on
some systems(#1519)
2014-11-25 14:47:54 -03:00
John Szakmeister
db914e8b61 Fix broken functional test.
In Lua, all math is floating point.  We need to coerce the result of a
division into a integer with the `{get,set}_height` and
`{get,set}_width` window_spec functional tests.
2014-11-25 06:11:43 -05:00
Thiago de Arruda
aa22612112 test: Add gdbserver support on helpers.lua
The $GDB env var can be set to run tests under gdbserver. If $VALGRIND is also
set, it will add the --vgdb=yes command-line option to valgrind instead of
starting gdbserver.
2014-11-23 08:56:43 -03:00
Eliseo Martínez
1f2c197ebe Fix functional-test-105 failure in OSX.
See https://github.com/neovim/neovim/issues/1519 for failure report.

Cause    : In OSX, /tmp is a symbolic link to /private/tmp, which causes
           expected and got results different because of implicit
           resolution.
Solution : Resolve path before setting expected value.
2014-11-21 22:08:16 +01:00
Thiago de Arruda
230c935e73 test: Fix problems in job_spec.lua
Nvim wasn't exiting cleanly in some job tests due to errors.

This can't be noticed until the next commit, which will perform a refactoring to
selectively process K_EVENT, so the `qa!` command executed at the end of each
test blocks forever if there are errors which require the user to press ENTER(in
that state Nvim no longer will process events).
2014-11-21 15:39:04 -03:00
Thiago de Arruda
179c51319d test: Refactor functional helpers to use vim_input
The vim_input function accepts raw terminal input and so is better to emulate
real user, especially because it is not deferred as vim_feedkeys.

Using this function required a number of changes:

- expect() was refactored to use curbuf_contents()
- The vim_eval function in request() was moved to curbuf_contents(). For most
  cases this is enough(we only care for synchronizing api calls with user input
  when verifying buffer contents).
- <C-@>(NUL) is preprocessed before being passed to replace_termcodes.
- Legacy test 4 had a bug that only became visible when using vim_input, it is
  fixed now.
- An extra blank line deletion was required for test 101

The last two items show that vim_feedkeys because it is not 100% equivalent to
receiving terminal input.
2014-11-21 15:39:04 -03:00
Thiago de Arruda
6b17082d3c runtime: Refer to plugins running outside Nvim as "remote plugins"
- Rename autoload/rpc to autoload/remote
- External plugins are now remote plugins
- External plugins directory is "rplugin"
2014-11-21 10:11:42 -03:00
Rainer Borene
df5a17fb51 legacy tests: migrate test105 2014-11-20 21:06:37 -03:00
Rainer Borene
da3ade6a59 legacy tests: migrate test26 2014-11-20 21:06:37 -03:00
Rainer Borene
021d9bdcc0 legacy tests: migrate test101 2014-11-20 21:06:37 -03:00
Rainer Borene
50876c2f70 legacy tests: migrate test75 2014-11-20 21:06:37 -03:00
Rainer Borene
a93d370c75 legacy tests: migrate test51 2014-11-20 21:06:37 -03:00
Rainer Borene
c9159586b8 legacy tests: migrate test43 2014-11-20 21:06:37 -03:00
Rainer Borene
bbd95c0514 legacy tests: migrate test33 2014-11-20 21:06:37 -03:00
Rainer Borene
8c872a945e legacy tests: migrate test67 2014-11-20 21:06:37 -03:00
Rainer Borene
7fc5d6fc8e legacy tests: migrate test66 2014-11-20 21:06:37 -03:00
Rainer Borene
963a146e8b legacy tests: migrate test25 2014-11-20 21:06:37 -03:00
Rainer Borene
8ca8a0da08 legacy tests: migrate test104 2014-11-20 21:06:37 -03:00
Rainer Borene
e0332e7f7c legacy tests: implement :source helper method. 2014-11-20 21:06:37 -03:00
Rainer Borene
c152cdd0f3 legacy tests: migrate test5 2014-11-20 21:06:37 -03:00
Thiago de Arruda
f291f41525 test: Add tests for the python provider
These tests were adapted from the python-client repository
2014-11-18 14:58:31 -03:00
Thiago de Arruda
ca1d8673be test: Add tests for the rpc#define#* functions 2014-11-18 14:58:31 -03:00
Thiago de Arruda
3e8ef31ada shell: Use job_write_cb for closing stdin
Commit @45525853d352 removed usage of the `job_write_cb` for closing stdin due
to a memory error, but that doesn't work anymore because `job_close_in` closes
stdin immediately, possibly trimming input data before it is fully written.

Since most memory issues with jobs have been fixed, re-add the `job_write_cb`
call to ensure stdin is only closed when it should. Also add tests for scenarios
where using the callback makes a difference.
2014-11-10 18:47:46 -03:00
Thiago de Arruda
ab826d88f6 eval: Return an empty list from systemlist() when there's no output
This is the behavior on vim's `systemlist()`.
2014-11-10 18:47:03 -03:00
Thiago de Arruda
63a98fca55 test: Fix nondeterminism in tests with notifications
Tests which spin the event loop and stop it in a notification handler have a
chance of re-entering the event loop due to the `vim_eval` call in the
`request()` helper(assuming the request call is what triggered the
notification). Since this will cause an error to be thrown by the lua client,
don't send the extra `vim_eval` request when the loop has been stopped.
2014-11-10 18:46:09 -03:00
Scott Prager
ea3296ad85 job_spec: Fix bad test. 2014-11-07 13:34:56 -03:00
Scott Prager
fd36dc208e job: Let vimL jobsend() accept a list.
Use save_tv_as_string(), same as vimL system(). This also makes
jobsend() more liberal in what it can accept. For example,
`jobsend(j, 123)` is now valid.

Closes #1176
2014-11-07 13:34:56 -03:00
Scott Prager
e90973e035 job: Make v:job_data[2] a list.
Factor out string_to_list() from f_system()'s implementation
and use that to set job_data. This has the technical advantage of
preserving NULs, and may be more convenient for users.

Required for #1176.
2014-11-07 13:34:56 -03:00
Thiago de Arruda
d3f81424e5 job: Only force-close stdout/stderr when the job exits
stdout/stderr should only be closed after the job truly exits, or else we can
lose data sent by it.
2014-11-07 09:12:42 -03:00
Thiago de Arruda
88a49148b3 test: Pass --show-possibly-lost=no to valgrind in helpers.lua
This command-line flag will suppress all warnings about interior pointers,
which are used in hashtab.c.
2014-11-07 01:40:18 -03:00
Thiago de Arruda
168a46fd31 test: Improve test environment setup and error handling/reporting
During test setup, we used to call a vimscript function(BeforeEachTest) that
attempted to restore Nvim to it's initial state as much as possible in order to
provide a clean environment for running new tests. This approach has proven to
be unreliable, as some tests leave state that can affect other tests, eventually
causing failures that are difficult to debug.

This commit changes the 'clear' function so it will restart Nvim every time it
is called, which is a slower, but more reliable solution that will simplify
spotting bugs in the future.

Some other improvements/fixes were also performed:

- Whenever an error is detected in a handler passed to "run()", the event loop
  will be stopped and the error will be propagated to the main thread.
- Errors and the "cleanup()" function will always send a quit command to the
  current Nvim instance. This should prevent memory starvation when running
  tests under valgrind(where each Nvim instance can consume a lot of memory).
- Fixed a wrong assertion in server_requests_spec.lua. Previously the failure
  was undetected in a notification handler.
- Fixed some tests to expect fully clean registers. The deleted cleanup function
  used to put an empty string in every register, but that resulted in a extra
  line being added.
2014-11-07 00:55:58 -03:00