aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/066_visual_block_tab_spec.lua
diff options
context:
space:
mode:
authorRainer Borene <rainerborene@gmail.com>2014-11-08 17:08:42 -0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-11-20 21:06:37 -0300
commit7fc5d6fc8e9bc4f03c2adeea04a6d3c0c2cdc9a3 (patch)
tree4b083385aa1e9800c66ca88aa0b816d5871956b5 /test/functional/legacy/066_visual_block_tab_spec.lua
parent963a146e8bc09bfb3ef0b8c16e4361b2f57fe0fb (diff)
downloadrneovim-7fc5d6fc8e9bc4f03c2adeea04a6d3c0c2cdc9a3.tar.gz
rneovim-7fc5d6fc8e9bc4f03c2adeea04a6d3c0c2cdc9a3.tar.bz2
rneovim-7fc5d6fc8e9bc4f03c2adeea04a6d3c0c2cdc9a3.zip
legacy tests: migrate test66
Diffstat (limited to 'test/functional/legacy/066_visual_block_tab_spec.lua')
-rw-r--r--test/functional/legacy/066_visual_block_tab_spec.lua64
1 files changed, 64 insertions, 0 deletions
diff --git a/test/functional/legacy/066_visual_block_tab_spec.lua b/test/functional/legacy/066_visual_block_tab_spec.lua
new file mode 100644
index 0000000000..cd283e6746
--- /dev/null
+++ b/test/functional/legacy/066_visual_block_tab_spec.lua
@@ -0,0 +1,64 @@
+-- vim: set foldmethod=marker foldmarker=[[,]] :
+-- Test for visual block shift and tab characters.
+
+local helpers = require('test.functional.helpers')
+local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
+local execute, expect = helpers.execute, helpers.expect
+
+describe('visual block shift and tab characters', function()
+ setup(clear)
+
+ it('is working', function()
+ insert([[
+ one two three
+ one two three
+ one two three
+ one two three
+ one two three
+
+ abcdefghijklmnopqrstuvwxyz
+ abcdefghijklmnopqrstuvwxyz
+ abcdefghijklmnopqrstuvwxyz
+ abcdefghijklmnopqrstuvwxyz
+ abcdefghijklmnopqrstuvwxyz]])
+
+ feed('gg')
+ feed([[fe<C-v>4jR<esc>ugvr1:'<,'>yank A<cr>]])
+ execute('/^abcdefgh')
+ feed('<C-v>4jI <esc>j<<11|D')
+ feed('j7|a <esc>')
+ feed('j7|a <esc>')
+ feed('j7|a <esc>4k13|<C-v>4j<')
+ execute('$-5,$yank A')
+ execute([[$-4,$s/\s\+//g]])
+ feed('<C-v>4kI <esc>j<<')
+ feed('j7|a <esc>')
+ feed('j7|a <esc>')
+ feed('j7|a <esc>4k13|<C-v>4j3<')
+ execute('$-4,$yank A')
+
+ -- Put @a and clean empty lines
+ execute('%d')
+ execute('0put a')
+ execute('$d')
+
+ -- Assert buffer contents.
+ expect([[
+ on1 two three
+ on1 two three
+ on1 two three
+ on1 two three
+ on1 two three
+
+ abcdefghijklmnopqrstuvwxyz
+ abcdefghij
+ abc defghijklmnopqrstuvwxyz
+ abc defghijklmnopqrstuvwxyz
+ abc defghijklmnopqrstuvwxyz
+ abcdefghijklmnopqrstuvwxyz
+ abcdefghij
+ abc defghijklmnopqrstuvwxyz
+ abc defghijklmnopqrstuvwxyz
+ abc defghijklmnopqrstuvwxyz]])
+ end)
+end)