Commit Graph

53 Commits

Author SHA1 Message Date
Jan Edmund Lazo
4abed17496 functionaltest: win: enable shada FileWriteCmd 2018-10-31 22:55:07 -04:00
Björn Linse
4da5cb38d3 startup: always wait for UI with --embed, unless --headless also is supplied 2018-09-22 10:18:28 +02:00
Björn Linse
bd8d43c6fe startup: wait for embedder before executing startup commands and files
Give embeders a chance to set up nvim, by processing a request before
startup. This allows an external UI to show messages and prompts from
--cmd and buffer loading (e.g. swap files)
2018-09-18 19:22:16 +02:00
ZyX
a9fa66b5b8 functests: Add tests 2018-09-06 02:12:36 +03:00
James McCoy
e243dbdc32
test: man_spec: Fix use of nested [[ quoting
Lua (not LuaJIT) complains about the "^[[" strings inside the expect,
since it sees them as nested quotes.  Change the quoting to [=[ ]=] to
avoid the issue.
2018-02-02 07:28:56 -05:00
Justin M. Keyes
f8010ea3ec
test: robust cleanup, unique filenames #7950 (#7950)
Use unique filenames to avoid test conflicts.
Use read_file() instead of io.popen(), to ensures the file is closed.
Use helpers.rmdir(), it is far more robust than lfs.

closes #7911
2018-02-01 03:12:37 +01:00
Marco Hinz
72a7a884b4
tests: :checkhealth completion 2018-01-18 22:47:37 +01:00
Justin M. Keyes
59888b68ab Merge #7623 'man.vim: highlight bold, underlined text' 2018-01-09 10:10:22 +01:00
Jan Edmund Lazo
7311fb7cad win: enable more functional tests
- plugin/shada_spec.lua: Use \r\n as Windows EOL for tests on
  BufWriteCmd, FileWriteCmd, FileAppendCmd. Alternative is 'set
  fileformat=unix'.
2018-01-06 17:47:00 +01:00
Gabriel Holodak
eb44519b5d Address PR comments 2017-12-27 23:28:04 -05:00
Gabriel Holodak
134c0f0bdb Add functional tests for man highlighting 2017-12-27 23:27:14 -05:00
Justin M. Keyes
f5d4da0144
:checkhealth : validate 'runtimepath' (#7526) 2017-11-10 22:37:54 +01:00
Justin M. Keyes
3bcee71cc8 :checkhealth : validate $VIM 2017-10-17 01:51:21 +02:00
Justin M. Keyes
d214df4e9b doc: replace ":CheckHealth" with ":checkhealth" 2017-10-17 01:51:21 +02:00
Justin M. Keyes
5baeb4a49c ex-cmds: :checkhealth
Built-in `:checkhealth` checks for valid $VIMRUNTIME by attempting to
autoload `health#check()`.

closes #2977
closes #3159
2017-10-17 01:51:20 +02:00
Justin M. Keyes
c4ab110e04 health.vim: fix highlighting
`:syntax keyword` is affected by 'iskeyword'. When we aligned
'iskeyword' to that of filetype=help, colon (:) is now included.
Simplest way to deal with this is to include colon (:) in the `:syntax
keyword` directive.

Also:
- change "SUGGESTIONS" mouthful to "ADVICE"
- change "SUCCESS" to "OK"
2017-10-15 12:06:13 +02:00
Justin M. Keyes
d15317ece4 health.vim: fix test 2017-07-15 16:15:47 +02:00
James McCoy
d67e48379f
test: shada: Replace hard-coded 704 with dynamic version 2017-07-14 06:44:22 -04:00
AdnoC
5908f562df test: Fix and add cases for unnamed register
Also:

Add ru to shada tests with all keys

Add test for unset unnamed and register 0
2017-05-31 13:31:05 -04:00
AdnoC
beca4dc16c eval/shada: Add testing for unnamed register with setreg and startup 2017-05-31 13:19:08 -04:00
ZyX
65fb622000 functests: Replace execute with either command or feed_command
Hope this will make people using feed_command less likely: this hides bugs.
Already found at least two:

1. msgpackparse() will show internal error: hash_add() in case of duplicate
   keys, though it will still work correctly. Currently silenced.
2. ttimeoutlen was spelled incorrectly, resulting in option not being set when
   expected. Test was still functioning somehow though. Currently fixed.
2017-04-09 03:24:08 +03:00
Justin M. Keyes
a90beeadbb defaults: 'showcmd', 'belloff', 'ruler'
- Vim "unix default" of 'noshowcmd' is serving few users. And it's
  inconsistent.
- 'ruler' and 'belloff=all' improve the out-of-the-box experience.
- Continue to use 'noshowcmd' and 'noruler' by default in the functional
  tests to keep them fast.

TODO: Add a "disable slow stuff" command or mapping to address the
use-case of a very slow terminal connection.
2017-03-16 18:44:10 +01:00
ZyX
24b3b938e8 plugin/shada: Handle NUL characters with intchar correctly
Fixes #5482
2017-01-04 15:06:33 +03:00
ZyX
d82f5d1ba2 plugin/msgpack: Support character constants like '\0' 2017-01-04 14:53:02 +03:00
Justin M. Keyes
44e6ee930f build: Target luacheck HEAD.
https://github.com/mpeterv/luacheck/pull/81#issuecomment-261099606

> If you really want to use bleeding-edge version you should get the
> rockspec from master branch, not a fixed commit ...
> The correct way to install from a specific commit is cloning that
> commit and running "luarocks make" from project directory. The reason
> is that running "install" or "build" on an scm rockspec fetches
> sources from master but uses build description from the rockspec
> itself, which may be outdated.
2016-11-17 00:55:39 +01:00
Tommy Allen
84eed76b55 CheckHealth: Include v:throwpoint in error message (#5575)
* health.vim: Include v:throwpoint in error message

* health/provider.vim: Check for ruby executable

* health/provider.vim: Combine subprocess stdout and stderr

* test: Updated CheckHealth test
2016-11-12 11:59:15 +01:00
Justin M. Keyes
c853fd6fab CheckHealth: more checks 2016-10-25 15:55:29 +02:00
Justin M. Keyes
3c24704ac8 health.vim: Show results incrementally.
Also:

- improve precision of "No healthcheck found"
- fix SUGGESTIONS syntax group definition
- fix indentation of SUGGESTIONS
2016-09-05 19:22:01 -04:00
Björn Linse
1c22cab2fd api: consistently use nvim_ prefix and update documentation 2016-08-31 21:57:06 +02:00
Rui Abreu Ferreira
39c628d031 Mark some functional tests as pending in Windows 2016-08-26 08:21:41 +01:00
Justin M. Keyes
ed49d9d866 CheckHealth: Accept [plugin1 [, plugin2 [, ...]]] args.
To healthcheck the "foo" plugin:
    :CheckHealth foo
To healthcheck the "foo" and "bar" plugins:
    :CheckHealth foo bar
To run all auto-discovered healthchecks:
    :CheckHealth
2016-08-21 22:03:28 -04:00
Justin M. Keyes
545e7a4163 CheckHealth
- Overlay markdown syntax/filetype, don't invent new filetypes/syntaxes.
- migrate s:check_ruby()
- s:indent_after_line1
- Less-verbose output
2016-08-21 21:25:33 -04:00
TJ DeVries
2cc523c3af CheckHealth
- Use execute() instead of redir
- Fixed logic on suboptimal pyenv/virtualenv checks.
- Move system calls from strings to lists. Fixes #5218
- Add highlighting
- Automatically discover health checkers
- Add tests

Helped-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Helped-by: Tommy Allen <tommy@esdf.io>

Closes #4932
2016-08-21 21:25:33 -04:00
Björn Linse
f282b8ecac tests: don't ignore highlights in various tests 2016-08-14 21:53:02 +02:00
ZyX
2126ec0c5b functests: Fix matchparen_spec.lua 2016-06-17 20:38:03 +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
4682b21ef2 Merge pull request #4654 from KillTheMule/testlint
Satisfy testlint.
2016-05-06 01:13:39 -04:00
KillTheMule
360d0513d1 Satisfy testlint.
For that, make luatest ignore the preload.lua files.
2016-04-28 19:30:17 +02:00
KillTheMule
f931e78fe4 test: matchparen_spec.lua
Covers vim-patch 7.4.1296
2016-04-27 21:48:18 -04:00
ZyX
a64114eba0 functests: Make json_functions_spec use new NIL where appropriate 2016-04-18 02:48:20 +03:00
ZyX
6e5498c3e3 runtime/msgpack: Add support for special values 2016-04-18 02:44:03 +03:00
Thiago de Arruda
c18d5917e3 Update lua client to 0.0.1-24
The new version of the lua client uses libmpack as a backend, and some test
scripts had to be updated to reflect that.
2016-04-13 09:21:32 -03:00
Björn Linse
8eb8ebf905 tests: update tests to use [gs]et_lines instead of [gs]et_line_slice 2016-04-01 11:29:51 +02:00
Thiago de Arruda
96af115c71 Normalize nan/-nan in plugin/msgpack_spec.lua
-NaN doesn't exist in the IEEE 754 spec, it is a hardware-specific detail
abstracted away by luajit(and not by lua or nvim), so there's no need to test
it.  Normalize all tests that involve -nan so the suite will be compatible with
both Lua and Luajit.
2016-03-07 13:08:48 -03:00
Marco Hinz
483d4abee7 Test: remove artifacts from root directory
The tests would leave the following test files in the root directory:

    Xtest-functional-plugin-shada.shada
    Xtest-functional-plugin-shada.shada.tmp.f

Clean them up in teardown().
2015-12-01 20:46:13 +01:00
Felipe Morales
80cf03602e Merge pull request #3581 from ZyX-I/fix-shada
Store last search direction when writing ShaDa files
2015-11-23 23:03:29 +01:00
ZyX
b98cea909f shada: Also store last search direction
Note: it looks like viminfo files do not store search direction intentionally.
After reading viminfo file search direction was considered to be “forward”.

Note 2: all files created on earlier Neovim version will automatically receive
“forward” direction.

Fixes #3580
2015-11-23 17:08:01 +03:00
Marco Hinz
d9fbc1865b test/functional: clean up according to luacheck (part 2) 2015-11-23 13:57:21 +01:00
ZyX
ae0576a472 runtime: Add shada.vim syntax file 2015-11-01 21:27:28 +03:00
ZyX
9037a180de runtime: Add [ft]plugin/shada.vim files that automatically open .shada 2015-11-01 21:27:28 +03:00