mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 17:12:40 +00:00
test: legacy/012_directory_spec: Also use dot-prefix on Windows.
win32 handles dot-prefixed files just fine; Nvim-on-Windows does not perpetuate the Vim-on-Windows behavior of avoiding dot-prefixed files.
This commit is contained in:
@@ -53,27 +53,21 @@ describe("'directory' option", function()
|
|||||||
execute('set dir=.,~')
|
execute('set dir=.,~')
|
||||||
|
|
||||||
-- sanity check: files should not exist yet.
|
-- sanity check: files should not exist yet.
|
||||||
eq(nil, lfs.attributes('.Xtest1.swp')) -- unix
|
eq(nil, lfs.attributes('.Xtest1.swp'))
|
||||||
eq(nil, lfs.attributes('Xtest1.swp')) -- non-unix
|
|
||||||
|
|
||||||
execute('e! Xtest1')
|
execute('e! Xtest1')
|
||||||
wait()
|
wait()
|
||||||
eq('Xtest1', eval('buffer_name("%")'))
|
eq('Xtest1', eval('buffer_name("%")'))
|
||||||
-- Verify that the swapfile exists. In the legacy test this was done by
|
-- Verify that the swapfile exists. In the legacy test this was done by
|
||||||
-- reading the output from :!ls.
|
-- reading the output from :!ls.
|
||||||
if eval('has("unix")') == 1 then
|
neq(nil, lfs.attributes('.Xtest1.swp'))
|
||||||
neq(nil, lfs.attributes('.Xtest1.swp'))
|
|
||||||
else
|
|
||||||
neq(nil, lfs.attributes('Xtest1.swp'))
|
|
||||||
end
|
|
||||||
|
|
||||||
execute('set dir=./Xtest2,.,~')
|
execute('set dir=./Xtest2,.,~')
|
||||||
execute('e Xtest1')
|
execute('e Xtest1')
|
||||||
wait()
|
wait()
|
||||||
|
|
||||||
-- swapfile should no longer exist in CWD.
|
-- swapfile should no longer exist in CWD.
|
||||||
eq(nil, lfs.attributes('.Xtest1.swp')) -- unix
|
eq(nil, lfs.attributes('.Xtest1.swp'))
|
||||||
eq(nil, lfs.attributes('Xtest1.swp')) -- non-unix
|
|
||||||
|
|
||||||
eq({ "Xtest1.swp", "Xtest3" }, ls_dir_sorted("Xtest2"))
|
eq({ "Xtest1.swp", "Xtest3" }, ls_dir_sorted("Xtest2"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user