summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_remote.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:59 +0000
commitcccb21df3b4c6fe0aaa99743c418aa973aeebad0 (patch)
tree35a2d1f88d47e930fec425da1c1cb89b3ccae6e0 /src/testdir/test_remote.vim
parentReleasing progress-linux version 2:9.1.0199-1~progress7.99u1. (diff)
downloadvim-cccb21df3b4c6fe0aaa99743c418aa973aeebad0.tar.xz
vim-cccb21df3b4c6fe0aaa99743c418aa973aeebad0.zip
Merging upstream version 2:9.1.0374.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/testdir/test_remote.vim45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/testdir/test_remote.vim b/src/testdir/test_remote.vim
index ae931fd..1475052 100644
--- a/src/testdir/test_remote.vim
+++ b/src/testdir/test_remote.vim
@@ -76,4 +76,49 @@ func Test_remote_servername()
close
endfunc
+func Test_remote_servername_shellslash()
+ " Note this test does not currently run on Windows
+ " because:
+ " 1) we cannot run the gui version of Vim inside a terminal
+ " 2) Running Windows vim.exe inside a terminal would work, but is
+ " disabled because of the limited colors inside the default Windows
+ " console (see CanRunVimInTerminal in term_util.vim)
+ CheckRunVimInTerminal
+ CheckMSWindows
+
+ " That is the file we want the server to open,
+ " despite the wildignore setting
+ call mkdir(expand('~/remote/'), 'pD')
+ call writefile(range(1, 20), expand('~/remote/XTEST.txt'), 'D')
+ " just a dummy file, so that the ':wq' further down is successful
+ call writefile(range(1, 20), 'Xdummy.log', 'D')
+
+ " Run Vim in a terminal and open a terminal window to run Vim in.
+ let lines =<< trim END
+ set shellslash
+ cd ~/remote
+ END
+ call writefile(lines, 'XRemoteEditing1.vim', 'D')
+ let buf = RunVimInTerminal('--servername XVIMTEST -S XRemoteEditing1.vim Xdummy.log', {'rows': 10})
+ call TermWait(buf)
+
+ " wildignore setting should be ignored and the XVIMTEST server should now
+ " open XTEST.txt, if wildignore setting is not ignored, the server
+ " will continue with the Xdummy.log file
+ let buf2 = RunVimInTerminal('--servername XVIMTEST --remote-silent ~/remote/XTEST.txt', {'rows': 5, 'wait_for_ruler': 0})
+ " job should be no-longer running, so we can just close it
+ exe buf2 .. 'bw!'
+
+ call term_sendkeys(buf, ":pwd\<CR>")
+ call WaitForAssert({-> assert_match('remote/$', term_getline(buf, 10))}, 1000)
+ call TermWait(buf)
+ call term_sendkeys(buf, ":q!\<CR>")
+ call TermWait(buf)
+ if term_getstatus(buf) == 'running'
+ call StopVimInTerminal(buf)
+ endif
+ bw!
+ close
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab