Commit Graph

10177 Commits

Author SHA1 Message Date
Björn Linse
4e7d85e635 shell: update execute('!cmd') test to new behavior
And similarly nvim_command_output test
2018-02-06 20:16:38 +01:00
Björn Linse
9af14506e5 shell: add test for binary and multibyte output
Also update existing tests for new (vim-compatible) newline behavior
2018-02-06 10:23:26 +01:00
Björn Linse
2d99b81ab5 shell: use msg_outtrans_len_attr for :!cmd
fixes #7830 and #7788
2018-02-05 22:57:43 +01:00
James McCoy
0851057a8d
Merge pull request #7957 from jamessan/lua-functionaltest
[RFC] Ensure build works without LuaJIT available
2018-02-04 07:54:30 -05:00
James McCoy
de10ea55f3
lint 2018-02-03 22:19:08 -05:00
ZyX
2316a38dd1
tests: Make format_string('%q', ...) output more stable
It appears to be different on lua and luajit.
2018-02-02 07:28:56 -05:00
ZyX
a2dfeb8a16
functests: Improve error reporting in _check_parsing function
May be needed for unit tests as well though.
2018-02-02 07:28:56 -05: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
James McCoy
5da6f0e903
travis: Don't run unit tests for functionaltest-lua build 2018-02-02 07:28:56 -05:00
James McCoy
86ee92f2a2
cmake: Set TEST_LIBNVIM_PATH to empty string when not unit testing 2018-02-02 07:28:56 -05:00
James McCoy
e34f2897d5
third-party: Install luabitop if using Lua 2018-02-02 07:28:56 -05:00
James McCoy
71190f1f34
third-party: lua: Set LUA_ROOT to ${DEPS_INSTALL_DIR} 2018-02-02 07:28:55 -05:00
James McCoy
204ec6337e
third-party: luarocks: Use Lua if LuaJIT is disabled 2018-02-02 07:28:55 -05:00
James McCoy
4487657576
travis: Disable LuaJIT for functionaltest-lua build
Since we're already using Lua for the testing this allows us to ensure
our build still works properly without LuaJIT available.
2018-02-02 07:28:49 -05:00
손량
e2afcfb020 build: BuildLuarocks.cmake: fix luacheck rockspec (#7961)
luacheck renamed the filename from luacheck-scm-1.rockspec to luacheck-dev-1.rockspec.
2018-02-02 11:21:58 +01:00
Justin M. Keyes
709a87d194 Merge #7463 'incsearch + hlsearch highlight all' 2018-02-01 23:25:55 +01:00
Marco Hinz
6710164c2c
provider: make has('ruby') only return 1 if gem is installed (#7944) 2018-02-01 13:14:29 +01: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
Justin M. Keyes
648fed975e os_system(): do not set up input stream for empty string #7951
Test failure:
test/functional/eval/system_spec.lua: "works with an empty string"
E5677: Error writing input to shell-command: EPIPE

ref https://github.com/neovim/neovim/pull/6558#issuecomment-361061035
ref #6554
2018-02-01 02:28:54 +01:00
Marvim the Paranoid Android
ec7cbabf01 version.c: update [ci skip] (#7886)
vim-patch:8.0.0175: setting language on MS-Windows does not always work
vim-patch:8.0.0185: system() test fails on MS-Windows
vim-patch:8.0.1435: memory leak in test_arabic
vim-patch:8.0.0424: compiler warnings on MS-Windows
vim-patch:8.0.0434: clang version not correctly detected
vim-patch:8.0.0458: potential crash if adding list or dict to dict fails
2018-02-01 02:24:45 +01:00
nate
dfcd09dc22 vim-patch:8.0.0672: synconcealed() changes too often #7887
Problem:    Third item of synconcealed() changes too often. (Dominique Pelle)
Solution:   Reset the sequence number at the start of each line.
cc0750dc6e

closes #7589
2018-02-01 02:12:21 +01:00
Chih-Hsuan Yen
3a5721e91b tui: libtermkey: force CSI driver for mouse input #7948
Fixes #7932

Nvim (tui.c) always enables SGR mouse (TUIData.unibi_ext.enable_mouse).
But if libtermkey sees key_mouse (kmous) in terminfo its terminfo driver
(driver-ti.c) will be activated, which by accident only supports X10
protocol. The libtermkey CSI driver (driver-csi.c), in contrast,
supports SGR.

We can force libtermkey to ignore the terminfo key_mouse entry by
returning NULL in the tui_tk_ti_getstr hook. That forces the CSI driver.

What is the effect of returning NULL from `tui_tk_ti_getstr()`?
- libtermkey `driver-ti.c:load_terminfo()` skips the entry.
- `termkey.c:peekkey()` iterates through all drivers, it finds
  `TERMKEY_RES_NONE` for the ti driver and falls back to the CSI driver.
2018-01-31 23:55:15 +01:00
Justin M. Keyes
6452831cf9 clipboard: macOS: fallback to tmux if pbcopy is broken #7940
On some versions of macOS, pbcopy doesn't work in tmux <2.6
https://superuser.com/q/231130
Fallback to tmux in that case.

Add a healthcheck for this scenario.
2018-01-31 11:37:05 +01:00
KunMing Xie
649123d07c vim-patch:8.0.0358,8.0.0359 (#7832)
vim-patch:8.0.0358: invalid memory access in C-indent code
Problem:    Invalid memory access in C-indent code.
Solution:   Don't go over end of empty line. (Dominique Pelle, closes vim/vim#1492)
60629d6425

vim-patch:8.0.0359: 'number' and 'relativenumber' are not properly tested
Problem:    'number' and 'relativenumber' are not properly tested.
Solution:   Add tests, change old style to new style tests. (Ozaki Kiichi,
            closes vim/vim#1447)
dc9a081712
2018-01-30 21:21:29 +01:00
Mahmoud Al-Qudsi
5d2dd2ebe2 win: has("wsl") on Windows Subsystem for Linux #7330
Per CMAKE docs, CMAKE_HOST_SYSTEM_VERSION is the result of `uname -r`:
https://cmake.org/cmake/help/v3.4/variable/CMAKE_HOST_SYSTEM_VERSION.html?highlight=uname

    A numeric version string for the system. On systems that support
    uname, this variable is set to the output of uname -r. On other
    systems this is set to major-minor version numbers.

On Windows it is something like "6.1", so it won't match ".*-Microsoft".

Closes #7329
2018-01-30 21:12:49 +01:00
KunMing Xie
8728a5d50b vim-patch:8.0.0448: some macros are lower case (#7936)
Problem:    Some macros are in lower case, which can be confusing.
Solution:   Make a few lower case macros upper case.
b5aedf3e22

ref #6297
2018-01-30 20:29:15 +01:00
KunMing Xie
2a1a624878 vim-patch:8.0.0443: terminal width is set to 80 in test3 (#7933)
Problem:    Terminal width is set to 80 in test3.
Solution:   Instead of setting 'columns' set 'wrapmargin' depending on
            'columns.

38a3d6c960
2018-01-30 20:15:05 +01:00
Justin M. Keyes
397ff2c35b
Merge #5822 'mouse.c: Fix mouse click on multibyte + concealed' 2018-01-29 23:50:43 +01:00
Christian Dywan
ca31f81a31 dist: snap packaging #7918 2018-01-29 23:02:15 +01:00
Justin M. Keyes
b55f831678
Merge #7842 'win: fnamemodify()' 2018-01-29 22:56:35 +01:00
Jan Edmund Lazo
41b3c7850f test: use helpers.pathroot() to avoid a syscall 2018-01-29 00:05:35 -05:00
Tommy Allen
1813c53e8d Updated tests 2018-01-28 23:47:11 -05:00
Tommy Allen
2eb8dc40ac Safer loop for skipping consecutive concealed chars 2018-01-28 23:47:11 -05:00
Tommy Allen
be7990bb49 Use one variable for tracking adjustment instead of two 2018-01-28 23:47:11 -05:00
Tommy Allen
caf87f597f Adjust cursor according to character display widths 2018-01-28 23:47:11 -05:00
Tommy Allen
60d0353119 Don't move cursor to the left if on the first column of wrapped line
ref: #7887
2018-01-28 23:47:11 -05:00
Tommy Allen
d2ff5d5bb0 Use utfc_ptr2len instead of utf_ptr2len 2018-01-28 23:47:11 -05:00
Tommy Allen
0376874c32 mouse.c: Fix mouse click on lines with multibyte text
fixes #5341, #5801
2018-01-28 23:47:11 -05:00
Jakub Łuczyński
9a36337d32 vim-patch:8.0.0528: highlight wrong text when 'wim' includes "longest" (#7927)
Problem:    When 'wildmenu' is set and 'wildmode' has "longest" then the first
            file name is highlighted, even though the text shows the longest
            match.
Solution:   Do not highlight the first match. (LemonBoy, closes vim/vim#1602)

ef8eb08978
2018-01-29 02:01:16 +01:00
KunMing Xie
2569fabf04 vim-patch:8.0.0427: 'makeencoding' missing from the options window (#7907)
Problem:    'makeencoding' missing from the options window.
Solution:   Add the entry.
ad4187e6fc
2018-01-28 22:53:53 +01:00
Justin M. Keyes
b251c42195
Merge #7924 'test/old: various fixes' 2018-01-28 22:51:51 +01:00
Justin M. Keyes
f9b738235e test/old: fix Test_set_completion()
Vim's src/testdir has more directories in it, so the "./samples/" item
happens to have a space in front of it.  This isn't relevant to the
test, so just elide the space for our case.
2018-01-28 22:29:17 +01:00
Jan Edmund Lazo
0578087e5e test: osx: try resolve($TMPDIR) 2018-01-28 13:58:56 -05:00
Jan Edmund Lazo
5c09f37d4a test: fix failed tests with $TMPDIR in QuickBuild 2018-01-28 13:58:56 -05:00
Jan Edmund Lazo
7ac21332cf Revert "test: fix failed test cases with tmpdir = $TMPDIR"
This reverts commit f7fe3012204169f22412194a78f196ffc72bb8c3.

Fails on QuickBuild because it uses a non-local path.
Need a environment-agnostic solution
2018-01-28 13:58:56 -05:00
Jan Edmund Lazo
28236867a0 test: fix failed test cases with tmpdir = $TMPDIR 2018-01-28 13:58:55 -05:00
Jan Edmund Lazo
c08c09add7 test: try $TMPDIR for temporary directory 2018-01-28 13:58:55 -05:00
Jan Edmund Lazo
5a39d2d00e test: fnamemodify with :8 filename modifier 2018-01-28 13:58:54 -05:00
Jan Edmund Lazo
984a93df96 win: enable legacy/fnamemodify_spec.lua 2018-01-28 13:58:54 -05:00
Jan Edmund Lazo
eb59dd6547 fixup: get network drive only, not entire path 2018-01-28 13:58:54 -05:00