Commit Graph

67 Commits

Author SHA1 Message Date
Justin M. Keyes
22a928aeac test: change CI_TARGET reference to CI
Travis defines[1] $CI for its builds, whereas $CI_TARGET is
a Neovim-specific env var from 6483a198e4
that lost prominence in d2eb4a9346.

[1] https://docs.travis-ci.com/user/environment-variables/
2016-01-01 23:58:42 -05:00
Marco Hinz
d9fbc1865b test/functional: clean up according to luacheck (part 2) 2015-11-23 13:57:21 +01:00
Marco Hinz
4a69e55f39 test/functional: clean up according to luacheck (part 1) 2015-11-23 13:57:21 +01:00
ZyX
ec1ca54d59 functests: Do not forget about -i argument
Target: make all tests run with chmod -x ~/.config/nvim ~/.local/share/nvim.
2015-10-23 15:56:51 +03:00
Thiago de Arruda
5d185c7772 test: Add basic tests for the TUI
The tests use `termopen` to spawn nvim and verify the TUI.
2015-10-01 15:22:49 -03:00
Thiago de Arruda
1143b416ab tui: Don't use 'pastetoggle' for automatic pasting
Add a new special key that can be used by UIs to toggle the 'paste' option and
use it in the TUI instead of the user's 'pastetoggle' value.

Close #2843 #2092
2015-10-01 15:22:48 -03:00
John Szakmeister
625f8ec07f Disable a broken functional test.
No one has taken a real interest in fixing this, so let's disable it for
now.  The issue crops up most on the QB OS X node, but it has
periodically occurred under other nodes too.
2015-10-01 07:01:13 -04:00
Björn Linse
c8aaabc09c api: vim_err_write: add tests for multiline handling 2015-09-16 21:42:57 +02:00
Felipe Morales
45121a267f defaults: set 'laststatus' to 2. #2876 2015-08-24 00:48:32 -04:00
Felipe Morales
be29de1fa2 defaults: set 'listchars' to "tab:> ,trail:-,nbsp:+". #2872
Re: https://github.com/neovim/neovim/issues/2676
2015-08-22 13:48:48 -04:00
Robin Allen
d5b5063622 Notify attached UIs whenever menus change
This adds a redraw notification "update_menu" which is sent whenever
Vim's menus are changed by the :menu command and friends.
2015-08-21 14:23:50 +01:00
Omar Sandoval
f79025b9de tui: Use underline cursor in Replace mode
This is a port of my original contribution to Vim, added in 7.4.687
(https://github.com/vim/vim/commit/v7-4-687). The TUI code has been
heavily refactored (see esp. 25ceadab37),
so this required some translation, but the logic is the same.
2015-07-26 23:45:41 -04:00
Omar Sandoval
fa48fc667a api: Simplify UI API on mode change
Currently, there are two functions in the UI API that are called when
the mode changes: insert_mode() and normal_mode(). These can be folded
into a single mode_change() entrypoint which can do whatever it wants
based on the mode it is passed, limited to INSERT and NORMAL for now.
2015-07-26 23:38:35 -04:00
Björn Linse
7a6bf3f418 Add ui test for default title (with/without filename) #3091 2015-07-23 22:35:42 +02:00
Thiago de Arruda
e85c9966b8 test: Increase determinism in screen_basic_spec tests 2015-07-16 23:08:09 -03:00
Lucas Hoffmann
7e7d78b2a6 doc: Fix some typos and trailing whitespace. #2875 2015-06-21 00:34:51 -04:00
Justin M. Keyes
9ebb5c681b defaults: enable 'hlsearch' by default. #2859
Also update the documentation regarding the option.

Re: https://github.com/neovim/neovim/issues/2676
2015-06-20 16:40:03 -04:00
Felipe Morales
b90378dfb0 options: Enable &wildmenu, use "list:longest,full" for &wildmode by default #2677 2015-05-17 15:24:31 -04:00
Clinton McKay
89d0e23624 test/ui: Add concealing tests. #2055 2015-05-09 17:21:54 +02:00
Michael Reed
98b3dc0571 vim-patch:7.4.659 + test
Problem:    When 'ruler' is set the preferred column is reset. (Issue 339)
Solution:   Don't set curswant when redrawing the status lines.

https://code.google.com/p/vim/source/detail?r=v7-4-659

Helped-by: David Bürgin <676c7473@gmail.com>
Based on #2347 by @pvinis
2015-05-01 16:45:02 -04:00
Marco Hinz
6fb66f4416 UI test: visual selection after left click in tabline 2015-04-28 14:16:37 +02:00
Marco Hinz
6449921943 UI test: left click in tabline 2015-04-28 14:16:37 +02:00
David Bürgin
af863d46a9 vim-patch:7.4.532 #2504
Problem:    When using 'incsearch' "2/pattern/e" highlights the first match.
Solution:   Move the code to set extra_col inside the loop for count.  (Ozaki
            Kiichi)

https://github.com/vim/vim/releases/tag/v7-4-532
2015-04-27 01:46:43 -04:00
Thiago de Arruda
3a20a9847e test/ui: Fix indeterminism in screen_basic_spec 2015-04-03 09:05:04 -03:00
Björn Linse
1e7624d2a0 tests/ui: warn when the correct state was seen temporarily.
Helped-by: Thiago de Arruda <tpadilha84@gmail.com>
2015-04-03 09:05:04 -03:00
Björn Linse
e5c4c4bca2 test/ui: add redraw debug util 2015-04-03 09:05:04 -03:00
Thiago de Arruda
2aa2513b8e test: Add terminal tests
- Modify tty-test to allow easier control over the terminal
- Add a new directory with various terminal tests/specifications
- Remove a pending job/pty test.
- Flush stdout in Screen:snapshot_util() (avoid waiting for the test to finish)
- Replace libuv sigwinch watcher by a sigaction handler. libuv randomly fails to
  deliver signals on OSX. Might be related to the problem fixed by
  @bbcddc55ee1e5605657592644be0102ed3a5f104 (under the hoods, libuv uses a pipe
  to deliver signals to the main thread, which might be blocking in some
  situations)
2015-03-25 18:57:36 -03:00
Thiago de Arruda
47e90ea1c5 test: Extract code to spawn nvim into the "spawn" helper function
This is can be used for spawning nvim outside a test context. Also refactor
screen.lua to use this function when loading the color map(It is better because
the GDB/VALGRIND environment variables are ignored)
2015-03-24 12:46:15 -03:00
Björn Linse
cf88f33eec tests/ui: cleanup ignores in screen_basic_spec 2015-03-19 23:09:56 +01:00
Björn Linse
93d01bf12e tests/ui: test hlsearch and incsearch 2015-03-19 23:09:56 +01:00
Thiago de Arruda
8b7b71f474 ui: Refactor so that busy state won't be the default
Even though assuming nvim is busy most times is simpler, it has a problem: A lot
of unnecessary busy_start/busy_stop notifications are sent to the UI. That's
because in the majority of scenarios almost no time is spent between
`event_poll` calls.

This restores the normal behavior which is to call busy_start only when nvim is
going to perform some task that can take a significant amount of time. Also
improve the usage of buffering in the TUI when changing the cursor state.
2015-03-18 14:16:23 -03:00
Thiago de Arruda
5199456471 test: Only display cursor marker in screen tests if nvim is not busy 2015-03-16 08:29:57 -03:00
Thiago de Arruda
c546875daf ui: Replace cursor_{on,off} by busy_{stop,start}
Switching cursor off is only necessary in two occasions:

- When redrawing to avoid terminal flickering
- When the editor is busy

The first can now be handled by the TUI, so most calls to ui_cursor_off can be
removed from the core.

So, before this commit it was only necessary to switch the cursor off to notify
the user that nvim was running some long operation. Now the cursor_{on,off}
functions have been replaced by busy_{stop,start} which can be handled in a
UI-specific way(turning the cursor off or showing a busy indicator, for
example).

To make things even more simpler, nvim is always busy except when waiting for
user input or other asynchronous events: It automatically switches to a non-busy
state when the event loop is about to be entered for more than 100 milliseconds.

`ui_busy_start` can be called when its not desired to change the busy state in
the event loop (As its now done by functions that perform blocking shell
invocations).
2015-03-15 10:30:59 -03:00
Björn Linse
a7aeda8c7a tests/ui: Also test character at cursor 2015-03-09 08:01:49 -03:00
Thiago de Arruda
3baba1e7bc refactor: Remove term modules and termcap options
- Removed term.c, term.h and term_defs.h
- Tests for T_* values were removed. screen.c was simplified as a
  consequence(the best strategy for drawing is implemented in the UI layer)
- Redraw functions now call ui.c functions directly. Updates are flushed with
  `ui_flush()`
- Removed all termcap options(they now return empty strings for compatibility)
- &term/&ttybuiltin options return a constant value(nvim)
- &t_Co is still available, but it mirrors t_colors directly
- Remove cursor tracking from screen.c and the `screen_start` function. Now the
  UI is expected to maintain cursor state across any call, and reset it when
  resized.
- Remove unused code
2015-02-21 05:08:21 -03:00
Thiago de Arruda
aed19a7c5f test: Remove -g flag from pynvim call in Screen.debug
The flag is no longer valid(pynvim always starts a GUI)
2015-02-20 20:38:42 -03:00
Thiago de Arruda
e7c945ab59 input: Escape utf8 sequences that contain CSI/K_SPECIAL 2015-02-18 13:16:30 -03:00
Thiago de Arruda
98dca8a827 test: Increase default_screen_timeout when running on travis
Some screen tests such as system/ctrl+c(viml_system_spec.lua) can take some time
to respond(default kill timeout is 2 seconds for an interrupted job) and fail
when running under a slow environment such as travis.
2015-02-16 23:17:38 -03: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
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
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
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
f08fe552f4 test: Fix screen.lua eol_clear method. 2015-01-22 08:54:37 -03:00