aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-26 18:42:19 -0400
committerGitHub <noreply@github.com>2020-10-26 18:42:19 -0400
commitb6897ebc0c623d0a74c221c3030c7eaf17b7e151 (patch)
tree87aafbbea8cc03bc9250f2710f1dd2e1971af01f /src/nvim/testdir
parenta22fe09b90a52f451d9fd8d3372b8c390dd1dc1a (diff)
parent6a0cb2a948cd7b523a2dc545b165acf6f44d10fb (diff)
downloadrneovim-b6897ebc0c623d0a74c221c3030c7eaf17b7e151.tar.gz
rneovim-b6897ebc0c623d0a74c221c3030c7eaf17b7e151.tar.bz2
rneovim-b6897ebc0c623d0a74c221c3030c7eaf17b7e151.zip
Merge pull request #13116 from skippi/vim-8.1.1769
vim-patch:8.1.{1769, 1772, 1791},8.2.{1747}
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_ins_complete.vim62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim
index b8632b9595..57a0a7aaf4 100644
--- a/src/nvim/testdir/test_ins_complete.vim
+++ b/src/nvim/testdir/test_ins_complete.vim
@@ -365,6 +365,68 @@ func Test_compl_in_cmdwin()
set wildmenu& wildchar&
endfunc
+" Test for insert path completion with completeslash option
+func Test_ins_completeslash()
+ CheckMSWindows
+
+ call mkdir('Xdir')
+
+ let orig_shellslash = &shellslash
+ set cpt&
+
+ new
+
+ set noshellslash
+
+ set completeslash=
+ exe "normal oXd\<C-X>\<C-F>"
+ call assert_equal('Xdir\', getline('.'))
+
+ set completeslash=backslash
+ exe "normal oXd\<C-X>\<C-F>"
+ call assert_equal('Xdir\', getline('.'))
+
+ set completeslash=slash
+ exe "normal oXd\<C-X>\<C-F>"
+ call assert_equal('Xdir/', getline('.'))
+
+ set shellslash
+
+ set completeslash=
+ exe "normal oXd\<C-X>\<C-F>"
+ call assert_equal('Xdir/', getline('.'))
+
+ set completeslash=backslash
+ exe "normal oXd\<C-X>\<C-F>"
+ call assert_equal('Xdir\', getline('.'))
+
+ set completeslash=slash
+ exe "normal oXd\<C-X>\<C-F>"
+ call assert_equal('Xdir/', getline('.'))
+ %bw!
+ call delete('Xdir', 'rf')
+
+ set noshellslash
+ set completeslash=slash
+ call assert_true(stridx(globpath(&rtp, 'syntax/*.vim', 1, 1)[0], '\') != -1)
+
+ let &shellslash = orig_shellslash
+ set completeslash=
+endfunc
+
+func Test_issue_7021()
+ CheckMSWindows
+
+ let orig_shellslash = &shellslash
+ set noshellslash
+
+ set completeslash=slash
+ call assert_false(expand('~') =~ '/')
+
+ let &shellslash = orig_shellslash
+ set completeslash=
+endfunc
+
func Test_pum_with_folds_two_tabs()
CheckScreendump