mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 22:06:07 +00:00
feat: ":wall ++p" creates parent dirs for each buf #36121
`:wall ++p` will create parent directories if they do not exist, for each modified buffer
This commit is contained in:
@@ -23,6 +23,9 @@ describe(':write', function()
|
||||
os.remove('test_fifo')
|
||||
os.remove('test/write/p_opt.txt')
|
||||
os.remove('test/write')
|
||||
os.remove('test/write2/p_opt.txt')
|
||||
os.remove('test/write2/p_opt2.txt')
|
||||
os.remove('test/write2')
|
||||
os.remove('test')
|
||||
os.remove(fname)
|
||||
os.remove(fname_bak)
|
||||
@@ -111,6 +114,21 @@ describe(':write', function()
|
||||
command('write ++p test/write/p_opt.txt')
|
||||
eq(1, eval("filereadable('test/write/p_opt.txt')"))
|
||||
|
||||
eq(0, eval("filereadable('test/write2/p_opt.txt')"))
|
||||
eq(0, eval("filereadable('test/write2/p_opt2.txt')"))
|
||||
eq(0, eval("filereadable('test/write3/p_opt3.txt')"))
|
||||
command('file test/write2/p_opt.txt')
|
||||
command('set modified')
|
||||
command('sp test/write2/p_opt2.txt')
|
||||
command('set modified')
|
||||
command('sp test/write3/p_opt3.txt')
|
||||
-- don't set p_opt3.txt modified - assert it isn't written
|
||||
-- and that write3/ isn't created
|
||||
command('wall ++p')
|
||||
eq(1, eval("filereadable('test/write2/p_opt.txt')"))
|
||||
eq(1, eval("filereadable('test/write2/p_opt2.txt')"))
|
||||
eq(0, eval("filereadable('test/write3/p_opt3.txt')"))
|
||||
|
||||
eq('Vim(write):E32: No file name', pcall_err(command, 'write ++p test_write/'))
|
||||
if not is_os('win') then
|
||||
eq(
|
||||
|
Reference in New Issue
Block a user