aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test39.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test39.in')
-rw-r--r--src/nvim/testdir/test39.in93
1 files changed, 93 insertions, 0 deletions
diff --git a/src/nvim/testdir/test39.in b/src/nvim/testdir/test39.in
new file mode 100644
index 0000000000..c1e1cc49a6
--- /dev/null
+++ b/src/nvim/testdir/test39.in
@@ -0,0 +1,93 @@
+
+Test Visual block mode commands
+And test "U" in Visual mode, also on German sharp S.
+
+STARTTEST
+:so small.vim
+:so mbyte.vim
+:" This only works when 'encoding' is "latin1", don't depend on the environment
+:set enc=latin1
+/^abcde
+:" Test shift-right of a block
+jlllljj>wlljlll>
+:" Test shift-left of a block
+G$hhhhkk<
+:" Test block-insert
+GklkkkIxyz
+:" Test block-replace
+Gllllkkklllrq
+:" Test block-change
+G$khhhhhkkcmno
+:$-4,$w! test.out
+:" Test block-insert using cursor keys for movement
+/^aaaa/
+:exe ":norm! l\<C-V>jjjlllI\<Right>\<Right> \<Esc>"
+:/^aa/,/^$/w >> test.out
+:" Test for Visual block was created with the last <C-v>$
+/^A23$/
+:exe ":norm! l\<C-V>j$Aab\<Esc>"
+:.,/^$/w >> test.out
+:" Test for Visual block was created with the middle <C-v>$ (1)
+/^B23$/
+:exe ":norm! l\<C-V>j$hAab\<Esc>"
+:.,/^$/w >> test.out
+:" Test for Visual block was created with the middle <C-v>$ (2)
+/^C23$/
+:exe ":norm! l\<C-V>j$hhAab\<Esc>"
+:.,/^$/w >> test.out
+:" Test for Visual block insert when virtualedit=all
+:set ve=all
+:/\t\tline
+:exe ":norm! 07l\<C-V>jjIx\<Esc>"
+:set ve=
+:.,/^$/w >> test.out
+:" gUe must uppercase a whole word, also when ß changes to SS
+Gothe youtußeuu endYpk0wgUe
+:" gUfx must uppercase until x, inclusive.
+O- youßtußexu -0fogUfx
+:" VU must uppercase a whole line
+YpkVU
+:" same, when it's the last line in the buffer
+YPGi111VUddP
+:" Uppercase two lines
+Oblah di
+doh dutVkUj
+:" Uppercase part of two lines
+ddppi333k0i222fyllvjfuUk
+:" visual replace using Enter or NL
+G3o1234567892k05l2jr G3o987652k02l2jr
+G3o1234567892k05l2jr
+G3o987652k02l2jr
+:"
+:" Test cursor position. When ve=block and Visual block mode and $gj
+:set ve=block
+:exe ":norm! 2k\<C-V>$gj\<Esc>"
+:let cpos=getpos("'>")
+:$put ='col:'.cpos[2].' off:'.cpos[3]
+:/^the/,$w >> test.out
+:qa!
+ENDTEST
+
+ line1
+ line2
+ line3
+
+aaaaaa
+bbbbbb
+cccccc
+dddddd
+
+A23
+4567
+
+B23
+4567
+
+C23
+4567
+
+abcdefghijklm
+abcdefghijklm
+abcdefghijklm
+abcdefghijklm
+abcdefghijklm