diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-10-05 20:28:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-05 20:28:55 -0400 |
commit | c76fc7942b3a88b90c6f0bc7fafabe1f55c7814e (patch) | |
tree | f190580228fad6bd38c98b1baec051871b448b57 /src/nvim/testdir/test_edit.vim | |
parent | e3afb30e69cc310f9f5ab776d33dc7acaf428981 (diff) | |
parent | 0f078bdde8aea9424281206ea96b4626ce6ff944 (diff) | |
download | rneovim-c76fc7942b3a88b90c6f0bc7fafabe1f55c7814e.tar.gz rneovim-c76fc7942b3a88b90c6f0bc7fafabe1f55c7814e.tar.bz2 rneovim-c76fc7942b3a88b90c6f0bc7fafabe1f55c7814e.zip |
Merge pull request #13040 from Shougo/vim-8.2.1793
[RDY] vim-patch:8.2.1793: not consistently giving the "is a directory" warning
Diffstat (limited to 'src/nvim/testdir/test_edit.vim')
-rw-r--r-- | src/nvim/testdir/test_edit.vim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 7f456ffbce..97a8ad25a3 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -1534,3 +1534,30 @@ func Test_edit_noesckeys() bwipe! " set esckeys endfunc + +" Test for editing a directory +" Todo: "is a directory" message is not displayed in Windows. +func Test_edit_is_a_directory() + CheckEnglish + CheckNotMSWindows + let dirname = getcwd() . "/Xdir" + call mkdir(dirname, 'p') + + new + redir => msg + exe 'edit' dirname + redir END + call assert_match("is a directory$", split(msg, "\n")[0]) + bwipe! + + let dirname .= '/' + + new + redir => msg + exe 'edit' dirname + redir END + call assert_match("is a directory$", split(msg, "\n")[0]) + bwipe! + + call delete(dirname, 'rf') +endfunc |