On Windows, `mch_open_rw` is not actually doing what it claims. This
manifests as "E301: Oops, lost the swap file !!!" when filename is
changed with :file {name}.
Steps to reproduce (covered by test/functional/ex_cmds/file_spec.lua):
nvim -u NONE
:edit test
:file test2
E301 Oops, lost the swap file!!!
From libuv/src/win/fs.c:
void fs__open(uv_fs_t* req) {
...
attributes |= FILE_ATTRIBUTE_NORMAL;
if (flags & _O_CREAT) {
if (!((req->fs.info.mode & ~current_umask) & _S_IWRITE)) {
attributes |= FILE_ATTRIBUTE_READONLY;
}
}
Lua has too many pitfalls here:
- os.execute() requires shell-escaping
- os.execute() has breaking changes between Lua 5.1 and 5.2
- No native way in Lua to handle "readonly" etc. on Windows
Problem: Toupper and tolower don't work properly for Turkish when 'casemap'
is empty. (Bjorn Linse)
Solution: Check the 'casemap' options when deciding how to upper/lower case.
3317d5ebbe
vim-patch:8.0.0553
Problem: Toupper/tolower test with Turkish locale fails on Mac.
Solution: Skip the test on Mac.
9f4de1f543
vim-patch:8.0.0554
Problem: Toupper and tolower don't work properly for Turkish when 'casemap'
contains "keepascii". (Bjorn Linse)
Solution: When 'casemap' contains "keepascii" use ASCII toupper/tolower.
1cc482069a
vim-patch:8.0.0555
Problem: Toupper/tolower test fails on OSX without Darwin.
Solution: Skip that part of the test also for OSX. (Kazunobu Kuriyama)
d2381a2cad
Problem: When making a character lower case with tolower() changes the byte
cound, it is not made lower case.
Solution: Add strlow_save(). (Dominique Pelle, closesvim/vim#1406)
cc5b22b3bf
Join almost identical strup_save and strlow_save functions to one
Function.
Should provide some compatibility with old busted. And also removes duplicate
parts from successString and skippedString, making them more like failureString
and errorString which do not have times for technical reasons (busted for some
reason did not yet compute duration before running the relevant handlers).
Reasoning:
1. gtest is better then something like utfTerminal, yet it is way too verbose.
2. gtest cannot be configured to show colors always.
3. Actually I am going to add a CMake target which will allow running tests
(especially, functional tests) in parallel, but this is not going to work
well with any of the default output handlers. Build in this case must be more
or less silent, yet debuggable. New handler does not support this in this
commit though.
Before this commit it emitted e_spell_trunc in the first case and
treated file as completely valid on the second. While first is fine
(both errors are actually valid, though old error is probably better),
second results in incorrect regex used.
Avoids this error:
./test/helpers.lua:27: cannot open ./Xtest-tmpdir/nvimfqH9dL: No such file or directory
stack traceback:
./test/helpers.lua:27: in function 'glob'
./test/helpers.lua:195: in function 'check_cores'
./test/functional/helpers.lua:628: in function <./test/functional/helpers.lua:626>
Problem: Possible overflow with spell file where the tree length is
corrupted.
Solution: Check for an invalid length (suggested by shqking)
399c297aa9
CVE-2017-5953