Commit Graph

140 Commits

Author SHA1 Message Date
Thiago de Arruda
e6208df73e test: Add synchronization helper for functional tests
The `wait` function will only return after all input has been processed by nvim.
It is useful to time assertions correctly.
2015-02-16 23:17:38 -03:00
Björn Linse
f4f0f646c3 api: always return empty string as api type String 2015-02-16 20:13:54 -05:00
Björn Linse
f56d1dc838 test: NULL-initialized vimscript strings should eval to empty strings 2015-02-16 20:13:53 -05:00
Justin M. Keyes
1b055c54a0 FEAT_SIGNS: restore :signs wildmenu, and add test. 2015-02-15 02:49:59 -05:00
Felipe Morales
6e992876ea shadow previously set signs #1893 2015-02-13 14:56:43 -05:00
Thiago de Arruda
4c92a0baca deps: Add Luajit compilation flags to improve debugging 2015-02-10 09:57:24 -03:00
Thiago de Arruda
11fa4f42fd test: Remove nondeterminism in systemlist interrupt tests
The systemlist test currently calls the `echo` command which can potentially
complete before being interrupted, causing random test failures.

Use `yes | xargs` instead. A `yes` invocation that is not piped through `xargs`
can produce a huge amount of lines in a very short time, leading memory
starvation when the result is being converted into a list. `xargs` ensures only
one line of output will be produced while allowing interrupt to be tested.
2015-02-06 15:24:08 -03:00
Björn Linse
f468fb70cb api/vim: allow guis and tests to retrieve the entire color table 2015-02-02 14:56:58 -03:00
Björn Linse
ae2b747e64 test/ui: update documentation for screen tests 2015-02-02 14:56:58 -03:00
Björn Linse
b78265e9b7 test/ui: enable strict mode by default (and in existing tests) 2015-02-02 14:56:58 -03:00
Björn Linse
97ac9f5c1d test/ui: more informative "unexpected highlight" errors 2015-02-02 14:56:58 -03:00
Florian Walch
2eda611cbc Travis: Fail fast, disable JIT for functional tests.
Disable JIT to find cause for random `PANIC: unprotected error in call to Lua API` on Travis (OS X).
2015-02-02 17:23:03 +01:00
Thiago de Arruda
bdba32ffd9 test: Mark unreliable test as pending in job_spec.lua
`job_send` is non-blocking and can potentially fail due to the following
`job_stop` call.  Since we can't reliably verify that the "exit" event is only
sent after the "stdout" event, mark the test as pending and fix after we can
get a notification about `job_send` status.
2015-01-29 11:52:56 -03:00
John Szakmeister
9023f62707 Fix the ctrl + left click test.
The test was hoping to not find a tags file, but didn't actively guard
against it.  In my case, I had a tags file present which was causing
different output to be generated.  To fix this, let's set the tags
option to look for an unlikely filename.
2015-01-28 17:48:36 -05:00
Björn Linse
da85859567 clipboard: more register tests for delete 2015-01-27 19:43:25 -05:00
Thiago de Arruda
8a363360dc test: Migrate legacy test 107
This test depends on terminal size to work correctly. After migration this
requirement is removed.
2015-01-23 20:46:27 -03:00
Thiago de Arruda
cbc23d93b9 test: Make default screen timeout depend on the VALGRIND env var
While running under valgrind, the screen can take significantly longer to
update(especially on travis) so a higher timeout can be required. Also reduce
the timeout when not running on valgrind.
2015-01-23 19:00:45 -03:00
Thiago de Arruda
41225fe4f6 test: Fix hanging test suite after failures
When a test that fails leaves nvim in a 'Press Enter...' state, the whole suite
will hang because the `qa!` command executed before the next test won't be
processed until '<enter>' is sent.

Now the lua client can send a signal with when `Session:exit()` is called, so
the `qa!` request is no longer necessary.

Also:

- Set noswapfile at startup to prevent tests from leaving .s* swap files(should
  also improve test environment determinism)
- Use `assert(false, msg) instead of `error(msg)` to report screen assertion
  failures.
2015-01-23 18:58:19 -03:00
Björn Linse
a9048896b3 tests/ui: strict mode 2015-01-23 07:47:48 -03:00
Björn Linse
5c837f613e tests/ui: snapshot util 2015-01-23 07:47:48 -03:00
Thiago de Arruda
3f0983e400 test: Set some options to reduce nondeterminism in functional tests
- shortmess+=I: Remove intro screen
- background=light: Disregard COLORFGBG environment variable
2015-01-22 08:54:42 -03:00
Thiago de Arruda
5b65ac2ca7 test: Make it possible to run functional tests with plain lua
Replace the hexadecimal escape sequences, which are only supported by luajit
2015-01-22 08:54:42 -03:00
Thiago de Arruda
f08fe552f4 test: Fix screen.lua eol_clear method. 2015-01-22 08:54:37 -03:00
Pavel Platto
1d5222985c vim-patch:7.4.492
Problem:    In Insert mode, after inserting a newline that inserts a comment
	    leader, CTRL-O moves to the right. (ZyX) Issue 57.
Solution:   Correct the condition for moving the cursor back to the NUL.
	    (Christian Brabandt)

  https://code.google.com/p/vim/source/detail?r=v7-4-492
2015-01-19 23:39:01 +02:00
Justin M. Keyes
c7f4e55362 Merge pull request #1798 from oni-link/fix.job.wait
job.c: Prevent early return from job_wait().
2015-01-18 13:23:17 -05:00
oni-link
d7d1b11332 Tests for system()/systemlist() when interrupted with CTRL-C. 2015-01-17 16:34:58 +01:00
Thiago de Arruda
dc18fa256f test: Add more functional test to cover new code
- emulate gui_running and terminal colors
- scrolling/clearing regions
- mouse wheel scrolling
- setting icon/title
- :stop/:suspend
- screen resize
2015-01-15 09:01:25 -03:00
Thiago de Arruda
8596776bf6 ui: Implement set_{title,icon} 2015-01-14 08:31:20 -03:00
Thiago de Arruda
ea771ac559 test: Add Screen.debug for inspecting screens of hanging tests 2015-01-13 21:21:20 -03:00
Thiago de Arruda
29bc6dfabd ui: Add 'rgb' parameter to ui_attach
When set to false, nvim will send cterm color numbers with `highlight_set`.
2015-01-13 11:54:52 -03:00
Thiago de Arruda
3e83e44792 input: Ignore invalid "<" key sequences
Ignoring invalid key sequences simplifies input handling in UIs. The only
downside is having to use "<lt>" everytime a "<" is needed on functional tests.
2015-01-13 11:54:51 -03:00
Thiago de Arruda
17b211d288 test: Remove unnecessary command from highlight_spec 2015-01-13 11:54:51 -03:00
Thiago de Arruda
926503c84e ui: Fix ui resizing and change some method names 2015-01-13 11:54:28 -03:00
Thiago de Arruda
fc8f768690 ui: Add update_fg/update_bg methods
It is necessary to notify the UI when the default background/foreground colors
change in order to render correctly.
2015-01-13 11:53:27 -03:00
Thiago de Arruda
1ccbd94bee test: Fix clear/eol_clear in screen.lua
These functions need to operate on the current the scroll region.
2015-01-13 11:53:27 -03:00
Justin M. Keyes
d7e18b5c95 Revert "[WIP] "abstract_ui" fixes and improvements" 2015-01-12 10:14:52 -05:00
Thiago de Arruda
d992213678 ui: Reimplement :suspend command for remote UIs.
- Remove suspend method from the UI protocol
- Handle `:suspend` by disconnecting the last channel that sent a request to
  nvim.
2015-01-12 09:47:41 -03:00
Thiago de Arruda
74c247f75b ui: Add 'rgb' parameter to ui_attach
When set to false, nvim will send cterm color numbers with `highlight_set`.
2015-01-12 09:47:41 -03:00
Thiago de Arruda
0219c87534 input: Ignore invalid "<" key sequences
Ignoring invalid key sequences simplifies input handling in UIs. The only
downside is having to use "<lt>" everytime a "<" is needed on functional tests.
2015-01-12 09:47:40 -03:00
Thiago de Arruda
d50d79831e test: Remove unnecessary command from highlight_spec 2015-01-12 09:47:40 -03:00
Thiago de Arruda
213c3c3e53 ui: Fix ui resizing and change some method names 2015-01-12 09:47:34 -03:00
Thiago de Arruda
4f5f246a95 ui: Add update_fg/update_bg methods
It is necessary to notify the UI when the default background/foreground colors
change in order to render correctly.
2015-01-10 21:41:31 -03:00
Thiago de Arruda
209b5ed6ba test: Fix eol_clear in screen.lua
It should only clear to the end of the current scroll region(this is the
behavior expected by nvim)
2015-01-10 21:41:31 -03:00
Justin M. Keyes
a31bcfb98a Merge pull request #1742 from fwalch/vim-7.4.552
vim-patch:7.4.552
2014-12-30 00:10:26 -05:00
Justin M. Keyes
13d950f6ed Merge pull request #1738 from fwalch/vim-7.4.549
vim-patch:7.4.549
2014-12-30 00:03:44 -05:00
Justin M. Keyes
ec615012a7 vim-patch:6a598be test for 7.4.487
https://code.google.com/p/vim/source/detail?r=6a598be6d4e8
2014-12-29 23:48:23 -05:00
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
e27460b60c vim-patch:7.4.552
Problem:    Langmap applies to Insert mode expression mappings.
Solution:   Check for Insert mode. (Daniel Hahler)

https://code.google.com/p/vim/source/detail?r=v7-4-552
2014-12-26 16:54:24 +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