aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/cpoptions_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-15 10:11:41 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-15 10:50:21 +0800
commit465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b (patch)
treed57568b30353002faa5e923ca0ffb8ea434797fc /test/functional/legacy/cpoptions_spec.lua
parentc821b5c6955e6e15039298d50641608168159c01 (diff)
downloadrneovim-465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b.tar.gz
rneovim-465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b.tar.bz2
rneovim-465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b.zip
vim-patch:8.2.0482: channel and sandbox code not sufficiently tested
Problem: Channel and sandbox code not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5855) https://github.com/vim/vim/commit/ca68ae13114619df3e4c195b41ad0575516f5ff6 Cherry-pick test_clientserver.vim changes form patch 8.2.0448.
Diffstat (limited to 'test/functional/legacy/cpoptions_spec.lua')
-rw-r--r--test/functional/legacy/cpoptions_spec.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/functional/legacy/cpoptions_spec.lua b/test/functional/legacy/cpoptions_spec.lua
new file mode 100644
index 0000000000..d2f382ec12
--- /dev/null
+++ b/test/functional/legacy/cpoptions_spec.lua
@@ -0,0 +1,34 @@
+local helpers = require('test.functional.helpers')(after_each)
+local Screen = require('test.functional.ui.screen')
+local clear = helpers.clear
+local command = helpers.command
+local feed = helpers.feed
+
+before_each(clear)
+
+describe('cpoptions', function()
+ it('$', function()
+ local screen = Screen.new(30, 6)
+ screen:attach()
+ command('set cpo+=$')
+ command([[call setline(1, 'one two three')]])
+ feed('c2w')
+ screen:expect([[
+ ^one tw$ three |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ -- INSERT -- |
+ ]])
+ feed('vim<Esc>')
+ screen:expect([[
+ vi^m three |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ |
+ ]])
+ end)
+end)