From 4b287119fe798da1ca1ae5b96f6503972ed3a229 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 3 May 2019 00:15:56 -0400 Subject: vim-patch:8.0.1708: mkdir with 'p' flag fails on existing directory Problem: Mkdir with 'p' flag fails on existing directory, which is different from the mkdir shell command. Solution: Don't fail if the directory already exists. (James McCoy, closes vim/vim#2775) https://github.com/vim/vim/commit/78a16b0f2a142aae1fdc96c50ab0f25194d0e755 --- src/nvim/testdir/test_eval_stuff.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/nvim/testdir/test_eval_stuff.vim') diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim index 111c85bb95..a99b7e9c0b 100644 --- a/src/nvim/testdir/test_eval_stuff.vim +++ b/src/nvim/testdir/test_eval_stuff.vim @@ -21,3 +21,20 @@ func Test_E963() call assert_fails("let v:oldfiles=''", 'E963:') call assert_equal(v_o, v:oldfiles) endfunc + +func Test_mkdir_p() + call mkdir('Xmkdir/nested', 'p') + call assert_true(isdirectory('Xmkdir/nested')) + try + " Trying to make existing directories doesn't error + call mkdir('Xmkdir', 'p') + call mkdir('Xmkdir/nested', 'p') + catch /E739:/ + call assert_report('mkdir(..., "p") failed for an existing directory') + endtry + " 'p' doesn't suppress real errors + call writefile([], 'Xfile') + call assert_fails('call mkdir("Xfile", "p")', 'E739') + call delete('Xfile') + call delete('Xmkdir', 'rf') +endfunc -- cgit From 96a8b0ab787c7d7148eb4c9881fdb5e022996081 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 3 May 2019 01:45:35 -0400 Subject: vim-patch:8.1.0369: continuation lines cannot contain comments Problem: Continuation lines cannot contain comments. Solution: Support using "\ . https://github.com/vim/vim/commit/67f8ab829911c7901c534ef2bf19cc34b622936f --- src/nvim/testdir/test_eval_stuff.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/testdir/test_eval_stuff.vim') diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim index a99b7e9c0b..1850fb0cf1 100644 --- a/src/nvim/testdir/test_eval_stuff.vim +++ b/src/nvim/testdir/test_eval_stuff.vim @@ -38,3 +38,14 @@ func Test_mkdir_p() call delete('Xfile') call delete('Xmkdir', 'rf') endfunc + +func Test_line_continuation() + let array = [5, + "\ ignore this + \ 6, + "\ more to ignore + "\ more moreto ignore + \ ] + "\ and some more + call assert_equal([5, 6], array) +endfunc -- cgit