Commit Graph

13917 Commits

Author SHA1 Message Date
Daniel Hahler
939d9053bd
channels: reflect exit due to signals in exit status code (#10573)
Uses `128 + term_signal` in case of exit due to a signal.

Fixes https://github.com/neovim/neovim/issues/10571.
2019-08-09 15:34:06 +02:00
Daniel Hahler
fa0c677a63
tests/functional: expect_msg_seq: use load_adjust (#10727)
Regardless of the comment "Big timeout for ASAN/valgrind" it would use
10s by default already.
This changes it to use `load_adjust`, which itself is only computed on
CI now, and outside of any tests - since it has side effects when being
used the first time!

The failure seen on AppVeyor:

    [ RUN      ] jobs can get the pid value using getpid: ERR
    test\functional\helpers.lua:167:
    ==============================================================================
    got 0 messages (ignored 0), expected 1
    stack traceback:
            test\functional\helpers.lua:167: in function 'expect_msg_seq'
            test/functional\core\job_spec.lua:288: in function <test/functional\core\job_spec.lua:281>

Log: https://ci.appveyor.com/project/neovim/neovim/builds/26537324/job/y1io66fbx399q7h6?fullLog=true#L6554
2019-08-09 15:32:38 +02:00
Justin M. Keyes
642e7daed5
Merge #9782 from janlazo/vim-8.1.0199
vim-patch:8.1.{199,200}
2019-08-09 12:00:47 +02:00
Ihor Antonov
3c0d637592 clang/"Null passed as a nonnull parameter" #10718 2019-08-09 11:24:30 +02:00
Justin M. Keyes
8a56bd944a Merge #10708 'remove DYNAMIC_ICONV'
closes #3457
2019-08-09 11:19:37 +02:00
Adrien Fabre
47b7b471fa :terminal : update buffer when switching tabpage #10700
fix #10696
2019-08-09 10:37:08 +02:00
Jan Edmund Lazo
a48896c6e7 vim-patch:8.1.1540: cannot build without +eval #10729
Problem:    Cannot build without the +eval feature.
Solution:   Define ex_const if needed.
0abb4273f6
2019-08-09 10:28:15 +02:00
Justin M. Keyes
4bb728dfa0
test: Minimize shada/helpers.lua #10728 2019-08-09 10:23:57 +02:00
Daniel Hahler
480794146f f_spellbadword: set len=0 for non-found word
`len` is used with `list_append_string` later, and should reflect the
length of `word` (i.e. 0 when not setting word / breaking above).

Ref: neovim/neovim#9782 (comment)
2019-08-08 21:40:29 -04:00
Jan Edmund Lazo
d1ce15f696 vim-patch:8.1.0200: spellbadword() not tested
Problem:    spellbadword() not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3235)
872e451e8c
2019-08-08 21:31:20 -04:00
Jan Edmund Lazo
18888c15fc vim-patch:8.1.0199: spellbadword() does not check for caps error
Problem:    spellbadword() does not check for caps error. (Dominique Pelle)
Solution:   Adjust capcol when advancing.
66ab916935
2019-08-08 21:31:20 -04:00
Björn Linse
25fff17d19
Merge pull request #10688 from bfredl/utf16lib
lua: minimal UTF-16 support needed for LSP
2019-08-09 00:00:55 +02:00
Björn Linse
1f54f68732 lua: minimal UTF-16 support needed for LSP 2019-08-08 20:10:14 +02:00
Jan Edmund Lazo
ce628e1187 vim-patch:8.1.1824: crash when correctly spelled word is very long (#10725)
Problem:    Crash when correctly spelled word is very long. (Ben Kraft)
Solution:   Check word length before copying. (closes vim/vim#4778)
5bcc5a1ff9
2019-08-08 17:23:25 +02:00
Daniel Hahler
e4bd31dbac
tests: use module pattern with test/functional/helpers.lua (#10724) 2019-08-08 16:03:25 +02:00
Daniel Hahler
0288ba6e38
build: Makefile: use _opt_pylint [ci skip] (#10720)
A separate rule it clearer, and allows for `make --keep-going lint` in
general later.

Ref: https://github.com/neovim/neovim/pull/10714
2019-08-08 16:02:59 +02:00
Daniel Hahler
38a3af5dff
tests: output_spec: use shell-test REP_NODELAY (#10726)
Fix flaky "shell command :! throttles shell-command output greater than ~10KB:":

    [ RUN      ] shell command :! throttles shell-command output greater than ~10KB:
    warning: Screen changes were received after the expected state. This indicates
    indeterminism in the test. Try adding screen:expect(...) (or wait()) between
    asynchronous (feed(), nvim_input()) and synchronous API calls.
      - Use screen:redraw_debug() to investigate; it may find relevant intermediate
        states that should be added to the test to make it more robust.
      - If the purpose of the test is to assert state after some user input sent
        with feed(), adding screen:expect() before the feed() will help to ensure
        the input is sent when Nvim is in a predictable state. This is preferable
        to wait(), for being closer to real user interaction.
      - wait() can trigger redraws and consequently generate more indeterminism.
        Try removing wait().

    ERR
    test/functional/ui/screen.lua:579: Failed to match any screen lines.
    Expected (anywhere): "
    %."
    Actual:
      |XXXXXXXXXX 591                                    |
      |XXXXXXXXXX 592                                    |
      |XXXXXXXXXX 593                                    |
      |XXXXXXXXXX 594                                    |
      |                                                  |
      |                                                  |
      |{3:-- TERMINAL --}                                    |
    stack traceback:
            test/functional/ui/screen.lua:579: in function '_wait'
            test/functional/ui/screen.lua:367: in function 'expect'
            test/functional/ui/output_spec.lua:63: in function <test/functional/ui/output_spec.lua:53>

Log: https://travis-ci.org/neovim/neovim/jobs/569082705#L5355
(gcc-functionaltest-lua)
2019-08-08 16:02:28 +02:00
erw7
2e01e7ce8a build/MSVC: Fix HAVE_ICONV_H #10697
Problem: HAVE_ICONV_H is not true in MSVC
Solution: Since iconv.h does not exist in the standard include directory
in MSVC, CMAKE_REQUIRED_INCLUDES must be set.

Note: This will be unnecessary after #10708.
2019-08-08 12:06:02 +02:00
Daniel Hahler
1896c72a54
build: port FindLibVterm to LibFindMacros (#10395) 2019-08-08 06:39:18 +02:00
Daniel Hahler
6ebe476675
build: clean up / remove X_USE_STATIC (#10713)
This was discouraged (as an option) in 5b5d353151 [1], not enabled/used by
default, and not working according to the comment in local.mk.example.

Taken out of https://github.com/neovim/neovim/pull/10395.

1: https://github.com/neovim/neovim/pull/2465
2019-08-07 22:19:55 +02:00
Daniel Hahler
0167c2e0c9
ci: AppVeyor: fix upload of coverage for oldtest (#10721)
This was not working due to having another `python` in the PATH then.

Ref: https://ci.appveyor.com/project/neovim/neovim/builds/26492761/job/dspm40v5l2v6gn40?fullLog=true#L15955
2019-08-07 22:09:18 +02:00
Daniel Hahler
1d6e368159 Fix lualint: remove unused var 2019-08-07 14:20:23 +02:00
Ihor Antonov
935ae63a48 cmakelists: fixed tests to avoid clang warnings (#10705)
* clang/"dead assignment"
* clang/"Uninitialized argument value"
2019-08-07 12:49:33 +02:00
Daniel Hahler
4f148edd75 tests: more cleanup of plugin/shada_spec
Ref: https://github.com/neovim/neovim/pull/10701/commits/330a6713#r311005754
Closes https://github.com/neovim/neovim/pull/10710.
2019-08-07 12:47:21 +02:00
Daniel Hahler
95e1ce24e8 build: lint: fix exit with optional pylint
Ref: https://github.com/neovim/neovim/pull/10714#issuecomment-518932355
2019-08-07 12:27:59 +02:00
Björn Linse
d75fc87dec
Merge pull request #10703 from ngortheone/clang_dead2
clang/"dead assignment": suppessed getchar.c

Possibly invalid, read on line 1972:
if (keylen >= 0 && keylen <= typebuf.tb_len) {
2019-08-07 10:27:07 +02:00
Björn Linse
6fb0020df4
Merge pull request #10513 from bfredl/bytecount
api/lua: add {byte_count} parameter to line region change event
2019-08-06 20:25:46 +02:00
Björn Linse
c0993ed343 lua: support getting UTF-32 and UTF-16 sizes of replaced text 2019-08-06 20:24:36 +02:00
Daniel Hahler
dc1359bf8e
Fix list_features to include space after first feature (#10711)
Regressed in e134cc9d4a: the use of list_in_columns was not adding a
space after the first features, because we do not start on a new line:

> Features: -acl+iconv +tui

This moves all the related code to `list_features`, and just joins them
with spaces.
2019-08-06 18:55:14 +02:00
Daniel Hahler
8218d474fa
build: move pylint to Makefile, optional with "make lint" (#10714)
This avoids errors when using "make lint", but "flake8" is not
available.  We do not want to install it then via third-party.
On CI "make pylint" is used explicitly.
2019-08-06 18:53:51 +02:00
Daniel Hahler
e85b4e749e
tests: unit.helpers: provide string with write errors (#10715)
This might help to have more information in case of errors, like
mentioned in https://github.com/neovim/neovim/commit/eec529cf9e.
2019-08-06 17:42:32 +02:00
Björn Linse
b0e26199ec lua: add {old_byte_size} to on_lines buffer change event 2019-08-06 17:01:47 +02:00
erw7
d6f15ccc3c remove DYNAMIC_ICONV 2019-08-06 12:44:22 +09:00
Justin M. Keyes
067a39ba85
Merge #10701 from justinmk/test-fixes
test: Eliminate plugin/helpers.lua
2019-08-06 01:36:01 +02:00
Justin M. Keyes
a29358dc58 Merge #10655 'environ(), getenv(), setenv()'
close #10655
2019-08-06 01:23:49 +02:00
Daniel Hahler
d55b12ea50 f_environ: cleanup/refactor
- use os_getenvname_at_index / os_getenv
- f_getenv: empty (*p == NUL) is not null (undefined)
2019-08-06 01:23:11 +02:00
Daniel Hahler
fd66ad2262 vim-patch:8.1.1305: there is no easy way to manipulate environment variables
Problem:    There is no easy way to manipulate environment variables.
Solution:   Add environ(), getenv() and setenv(). (Yasuhiro Matsumoto,
            closes vim/vim#2875)
691ddeefb5
2019-08-06 01:17:32 +02:00
Ihor Antonov
b09e03c64d clang/"dead assignment": screen.c #10702
Suppress the warning.

mb_c and mb_l describe a char together, they are not independent variables. The
coupled assignments are good practice to avoid future confusion, even if the
current code doesn't use an assigned value.
2019-08-06 00:53:54 +02:00
Ihor Antonov
512f24f71d clang/"dead assignment": suppessed
To ensure consistency and avoid possible errors in the code
the assigment is considered to be legit.
2019-08-05 18:40:31 -04:00
Justin M. Keyes
f6c9412436 test/mbyte_spec: skip broken test on QuickBuild
Forgot `return` in eec529cf9e.
2019-08-06 00:28:00 +02:00
Justin M. Keyes
330a6713bf test: Eliminate plugin/helpers.lua 2019-08-05 23:55:57 +02:00
Jan Edmund Lazo
7086751c5e vim-patch:8.1.1439: ga_grow(): 1.5x growth rate #10699
Problem:    Json_encode() is very slow for large results.
Solution:   In the growarray use a growth of at least 50%. (Ken Takata,
            closes vim/vim#4461)
c47ed44be7
2019-08-05 23:42:41 +02:00
Björn Linse
f5d1e0e7b1
Merge pull request #10690 from bfredl/lua_print
lua: laundry list (crashes and additions)
2019-08-05 13:59:40 +02:00
Björn Linse
88938634e7 lua: add vim.in_fast_event() to check if we are in a luv callback 2019-08-05 13:57:24 +02:00
Björn Linse
e6d77993d1 lua: do not crash on syntax error in debug.debug() 2019-08-05 13:19:44 +02:00
Björn Linse
d3a7bdefb0 lua: immediate-callback safe print() 2019-08-05 13:19:44 +02:00
Justin M. Keyes
51440204e7
Merge #10695 from justinmk/test-fixes
test: various fixes
2019-08-05 10:17:37 +02:00
Justin M. Keyes
d4a0b6c4e1 test/man_spec: remove plugin_helpers.reset()
The call to plugin_helpers.reset() is redundant with the clear() call
above it.  Probably just a copy-paste mistake.

Avoids exit_event race #8813.

Helped-by: Björn Linse <bjorn.linse@gmail.com>
2019-08-05 04:51:49 +02:00
Justin M. Keyes
eec529cf9e test/mbyte_spec: skip broken test on QuickBuild
14:13:04,119 INFO  - # ./test/unit/helpers.lua @ 760: mbyte utf_char2bytes for chars 0xa000 - 0xafff
    14:13:06,307 WARN  - E908: using an invalid value as a String
      /usr/home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/.deps/usr/bin/luajit:
      ./test/unit/helpers.lua:459: write() error: 32: Broken pipe
    14:13:06,308 WARN  - stack traceback:
    14:13:06,308 WARN  - 	[C]: in function 'throw'
    14:13:06,308 WARN  - 	...quests-automated/.deps/usr/share/lua/5.1/busted/core.lua:149: in function 'error'
    14:13:06,308 WARN  - 	...ts-automated/.deps/usr/share/lua/5.1/luassert/assert.lua:171: in function 'assert'
    14:13:06,308 WARN  - 	./test/unit/helpers.lua:459: in function 'write'
    14:13:06,308 WARN  - 	./test/unit/helpers.lua:626: in function 'hook'
    14:13:06,308 WARN  - 	./test/unit/helpers.lua:574: in function <./test/unit/helpers.lua:557>
    14:13:06,308 WARN  - 	[C]: in function 'type'
    14:13:06,308 WARN  - 	...d/.deps/usr/share/lua/5.1/busted/outputHandlers/base.lua:57: in function 'copyElement'
    14:13:06,308 WARN  - 	...d/.deps/usr/share/lua/5.1/busted/outputHandlers/base.lua:66: in function 'format'
    14:13:06,308 WARN  - 	...d/.deps/usr/share/lua/5.1/busted/outputHandlers/base.lua:172: in function 'fn'
    14:13:06,308 WARN  - 	...-requests-automated/.deps/usr/share/lua/5.1/mediator.lua:103: in function 'publish'
    14:13:06,308 WARN  - 	...quests-automated/.deps/usr/share/lua/5.1/busted/core.lua:201: in function 'safe'
    14:13:06,308 WARN  - 	...quests-automated/.deps/usr/share/lua/5.1/busted/core.lua:312: in function 'execute'
    14:13:06,308 WARN  - 	...sts-automated/.deps/usr/share/lua/5.1/busted/execute.lua:58: in function 'execute'
    14:13:06,308 WARN  - 	...ests-automated/.deps/usr/share/lua/5.1/busted/runner.lua:197: in function <...ests-automated/.deps/usr/share/lua/5.1/busted/runner.lua:11>
    14:13:06,308 WARN  - 	./.deps/usr/lib/luarocks/rocks/busted/2.0.0-1/bin/busted:3: in main chunk
    14:13:06,308 WARN  - 	[C]: at 0x004041a0
    14:13:06,323 WARN  - Terminated
    14:13:06,325 INFO  - Executing post-execute action...
    14:13:06,526 INFO  - Checking step execute condition...
    14:13:06,526 INFO  - Step execute condition satisfied, executing...
    14:13:06,706 INFO  - Executing pre-execute action...
    14:13:06,706 INFO  - Running step...
2019-08-05 04:19:36 +02:00
Justin M. Keyes
94afc201bc test: isCI(): add "name" parameter 2019-08-05 04:02:41 +02:00