Problem: Autocommands triggered by quickfix cannot always get the current
title value.
Solution: Call qf_fill_buffer() later. (Christian Brabandt)
6920c72d4d
Helped by @mhinz
Add both a test for cwd=/ and cwd=/tmp/nvim.XXXXX, to make sure that we
don't have regressions in cwd handling.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
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.
`event_teardown` is there from 974752c, by aktau. It was introduced with
`init_homedir` and `event_init`. Then both were removed by justinmk in
99a9161bac (`init_homedir`) and
49c5689f45 (`event_init`), but `event_teardown`
was not removed. Now this may cause a crash. More details in #4852.
Closes#4852
Problem: New style tests are executed in arbitrary order.
Solution: Sort the test function names. (Hirohito Higashi)
Fix the quickfix test that depended on the order.
cfc0a350a9
The following upstream patches that modified the original test have reached
master: 7.4.798, 7.4.818, 7.4.883, 7.4.977. The changes are incorporated into
the migrated test.
Also improve readability and some string delimiters.
Vim creates these scripts in test1 depending on what build features
are enabled so that tests that use these features are skiped if
necessary. Because Neovim only has one type of build (and the features
+eval, +windows, and +multi-byte are enabled in this build) they are
not necessary.
Problem: When there is a backslash in an option ":set -=" doesn't work.
Solution: Handle a backslash better. (Jacob Niehus) Add a new test, merge
in old test.
8f79acdf7e
Problem: Using "q!" when there is a modified hidden buffer does not unload
the current buffer, resulting in the need to abandon it again.
Solution: When using "q!" unload the current buffer when needed. (Yasuhiro
Matsumoto, Hirohito Higashi)
027387f70c
This was not a problem locally, but would often/sometimes/etc. (YMMV) fail on QB
and/or travis. This seems to fix it. Quoting @justinmk: "I have a feeling this
is just a bug in the bracketed paste special-cases in the existing code".
Problem: ":argadd" without argument is supposed to add the current buffer
name to the arglist.
Solution: Make it work as documented. (Coot, closesvim/vim#577)
2faa29f896
Problem: Using ":argadd" when there are no arguments results in the second
argument to be the current one. (Yegappan Lakshmanan)
Solution: Correct the w_arg_idx value.
a24f0a550f
The character class %s also matches a newline in lua, that's not really what we
want here. It works in the other cases in this function, so I left them, but
the final gsub should preserve newlines.
Problem: g-CTRL-G shows the word count, but there is no way to get the word
count in a script.
Solution: Add the wordcount() function. (Christian Brabandt)
ed767a2073
It's possible that the first test encounters a temp directory with files
in it, due to a previous test causing the first test to fail. Instead,
let's clean up before and after the test to make sure the temp area is
pristine before and after the test.
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.
Problem: When completing a shell command, directories in the current
directory are not listed.
Solution: When "." is not in $PATH also look in the current directory for
directories.
b5971141df
Most of it applied manually.
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
Problem: When "syntax manual" was used switching between buffers removes
the highlighting.
Solution: Set the syntax option without changing the value. (Anton
Lindqvist)
885f24fbca
Patch applied cleanly to the nvim sources except for version.c.
Problem: The fix in patch 7.3.192 is not tested.
Solution: Add a test, one for each regexp engine. (Elias Diem)
96c664af27
The patch was applied to 044_099_regexp_multibyte_magic_spec.lua as
these two legacy tests (44 and 99) were merged together (and
de-duplicated) in Neovim.
- Code from Vim source.
- Removed the check for 'guioptions'
- mouse_spec.lua: test <ScrollWheelLeft> and <ScrollWheelRight>
- Move horizontal scroll logic to mouse.c
- Remove 'gui_' from the function names
- Renamed variables to be more specific (as opposed to generic p, w).
- Marked some functions as `static`
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.
Problem: Vim can create a directory but not delete it.
Solution: Add an argument to delete() to make it possible to delete a
directory, also recursively.
da440d21a6
vim-patch:35e7594
35e7594dd4
"Add missing test files from 7.4.634 to the repository."
The discrepancy between the expected getpos() result of the old test
[0, 15, 2, 0] and the converted test [0, 3, 2, 0] is just a matter of how
the buffer is constructed: in the old Vim test the buffer has a bunch of
junk at the top.
The central purpose of the test is to verify that the getpost("'a") does
*not* return [0, 0, 0, 0].
Adds two undocumented v: variables: _null_list and _null_dict because I do not
know a reproducible way to get such lists (though I think I heard about this)
and dictionaries (do not remember hearing about them). NULL strings are obtained
using $XXX_UNEXISTENT_VAR_XXX.
Fixes crash in json_encode($XXX_UNEXISTENT_VAR_XXX). Other added tests worked
fine before this commit.