| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Change shada reencoding tests to check for
correct handling of UTF-8 and binary strings.
Delete enc=latin1 json tests.
|
|
|
|
|
| |
Problem: If CTRL-C is mapped, it does not interrupt :global output.
Solution: clear `mapped_ctrl_c` during :global.
|
|
|
|
|
| |
Closes #5267
Helped-by: oni-link <knil.ino@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #3529
Closes #5241
In Vim,
:echo system('cat - &', 'foo')
works because for both system() and :! Vim writes input to a temp file and uses
shell syntax to redirect the file to the backgrounded `cat` (get_cmd_output()
.. make_filter_cmd()).
In Nvim,
:echo system('cat - &', 'foo')
fails because we write the input directly via pipes (shell.c:do_os_system()),
but (per POSIX[1]) backgrounded process input stream is redirected from
/dev/null (unless overridden by shell redirection; supported only by some shells
[2]), so our writes are ignored, the process exits quickly, and if we are
writing data larger than the buffer size we'll see EPIPE.
This still works:
:%w !tee > foo1358.txt &
but this does not:
:%w !tee foo1358.txt &
though it *should* (why doesn't it?) because we still do the temp file dance
in do_bang() .. do_filter().
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
[2] http://unix.stackexchange.com/a/71218
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These tests are essentially affirming a regression vs Vim. In Vim,
:echo system('cat - &', 'foo')
returns "foo", because Vim internally wraps the command with shell-specific
syntax to redirect the streams from /dev/null[1].
That can't work in Nvim because we use pipes directly (instead of temp files)
and don't wrap the command with shell-specific redirection syntax.
References #3529
References #5241
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
|
|
|
|
|
|
|
|
|
| |
Check `exists('b:term_title')` to avoid the BufReadCmd for already-initialized
:terminal buffers.
Move the test for `:argadd`.
Add a test for `:edit<CR>`.
Tweak comments and code style.
|
|
|
| |
Delete the CWD using nvim instead of the external lua/test runner process.
|
|
|
|
|
|
|
|
|
|
| |
Closes #5291
Restores behaviour identical to Vim. If the user calls the VimScript
function 'getcwd()' and the working directory cannot be found (for
example because the directory has been deleted since the last time it
was used) an empty string needs to be returned instead of throwing an
error.
|
|
|
|
| |
When a new tabpage gets created it will copy the local working directory
of the previous one, if there is any.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Windows Lua's os.tmpname() returns relative paths starting with \s,
prepend them with $TEMP to generate a valid path.
In OS X os.tmpname() returns paths in '/tmp' but they should be in
'/private/tmp'. We cannot use os_name() for platform detection because
some tests use tempname() before nvim is spawned, instead use one of the
following:
1. Set SYSTEM_NAME environment variable before calling the tests, it
is set from CMAKE_SYSTEM_NAME(i.e. uname -s or 'Windows')
2. Call uname -s
3. Assume windows
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 3b12bb225adda2aac40a55f7009cae05311b2a43, ":oldfiles" was taught to
behave like Vim's ":browse oldfiles" if ":oldfiles!" was used. However,
this conflates the use of ! for abandoning a modified buffer with
choosing one file out of a list of oldfiles.
Now that ":browse" is supported again, ":browse oldfiles" will allow the
user to select an old file, while still complaining if that would cause
a modified buffer to be abandoned. ":browse oldfiles!" will just
abandon the buffer, as expected.
|
|
|
|
| |
Cf. https://github.com/neovim/neovim/pull/4995
|
|
|
|
| |
The test hit wait_return if x or .x.swp exists in the project root directory.
|
|
|
|
|
|
|
|
|
| |
menu_spec.lua yanks to the clipboard, but never pastes from it. This
can leave a child xsel process waiting around for something to paste the
content, causing the test process to hang.
Since the test isn't explicitly trying to exercise the clipboard, simply
use the default register.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
The directories table contains the names of the expected directory names
for varying scopes of the :cd tests. Using named indexes, instead of
numbered, makes the test more readable.
|
|
|
|
|
|
| |
Build wcwd/tcwd and wlwd/tlwd on top of the reworked cwd/lwd functions.
This will allow for easier testing of `getcwd()`/`haslocaldir()` in
arbitrary windows and/or tab pages.
|
|
|
|
|
|
|
| |
While trying to debug an issue, I discovered that the tests for illegal
arguments depended on the prior suite having run and started a session.
Let's remove that unintentional dependency by starting our own session
before each test.
|
|
|
|
|
| |
In longer directory paths, the test can hang waiting for the user to hit
enter to continue. Let's use the silent prefix to avoid this.
|
|\
| |
| | |
Satisfy testlint.
|
| |
| |
| |
| | |
For that, make luatest ignore the preload.lua files.
|
| |
| |
| |
| |
| |
| |
| | |
This change effectively disables history for lines inserted using this method.
Not a big problem since it does not work for them in Vim in first place.
Also solves a bug(?): ex_window() run while in :append mode opens search history
in Vim for some reason. Now it opens empty cmdline window.
|
|/
|
|
|
|
|
|
|
|
|
| |
When backupcopy=auto buf_write assumes backupcopy=yes when the file is a
hard/symbolic link. However this check was guarded by a UNIX ifdef. The
check itself is portable and the guard can be removed.
Added a couple tests to check the behaviour of bkc=auto and bkc=no
with a symbolic link.
Reported in #4525
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New ex commands: 'tcd', 'tchdir'
Changed Vimscript functions: 'haslocaldir', 'getcwd'
The ex-commands ':tcd' and ':tchdir' are the tab-local equivalents of
':lcd' and ':lchdir'. There are no new Vimscript functions introduced,
instead the functions 'haslocaldir' and 'getcwd' take in optional
arguments. See the documentation for details
Since there is now different levels of local directory a simple boolean
at source level is no longer sufficient; a new enumeration type is used
for the scope-level from now on.
The documentation has been accommodated for these new commands and
functional tests have been written to test the feature.
|
| |
|
|
|
|
|
| |
The new version of the lua client uses libmpack as a backend, and some test
scripts had to be updated to reflect that.
|
|
|
|
|
| |
If Nvim is in a "Press ENTER..." screen before the `get_vvar()` call, the test
will hang.
|
| |
|
| |
|
|
|
|
|
|
| |
Fixes #3676.
Reviewed-by: Marco Hinz <mh.codebro@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
- change approach for test 1: screen:expect() instead of assert()
- use execute() instead of command()
- 2 new tests that check none and wrong input for :oldfiles!
Helped-by: @fwalch
Helped-by: @tarruda
Helper-by: @justinmk
|
| |
|
|
|
|
|
|
|
| |
This adds two new tests for:
:profile dump
:profile stop
|
|
|
| |
Fixes #3605
|
| |
|
|
|
|
| |
Target: make all tests run with chmod -x ~/.config/nvim ~/.local/share/nvim.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Redraw can be flaky especially when remote commands happen during
command-mode. Assert the state directly instead of using Screen.
|
| |
|