diff src/testdir/test_options.vim @ 19536:bab20768e1fd v8.2.0325

patch 8.2.0325: ex_getln.c code not covered by tests Commit: https://github.com/vim/vim/commit/578fe947e3ad0cc7313c798cf76cc43dbf9b4ea6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 27 21:32:51 2020 +0100 patch 8.2.0325: ex_getln.c code not covered by tests Problem: Ex_getln.c code not covered by tests. Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5702)
author Bram Moolenaar <Bram@vim.org>
date Thu, 27 Feb 2020 21:45:04 +0100
parents 1b02482e6a61
children 9fbeb3bdf49e
line wrap: on
line diff
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -672,4 +672,27 @@ func Test_shellquote()
   call assert_match(': "#echo Hello#"', v)
 endfunc
 
+" Test for the 'rightleftcmd' option
+func Test_rightleftcmd()
+  CheckFeature rightleft
+  set rightleft
+  set rightleftcmd
+
+  let g:l = []
+  func AddPos()
+    call add(g:l, screencol())
+    return ''
+  endfunc
+  cmap <expr> <F2> AddPos()
+
+  call feedkeys("/\<F2>abc\<Left>\<F2>\<Right>\<Right>\<F2>" ..
+        \ "\<Left>\<F2>\<Esc>", 'xt')
+  call assert_equal([&co - 1, &co - 4, &co - 2, &co - 3], g:l)
+
+  cunmap <F2>
+  unlet g:l
+  set rightleftcmd&
+  set rightleft&
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab