diff src/testdir/test_arabic.vim @ 19550:b3ef3538b389 v8.2.0332

patch 8.2.0332: some code in ex_getln.c not covered by tests Commit: https://github.com/vim/vim/commit/d30ae2fc4acb3861fc7dc9618c1f90eee997d412 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 29 14:23:58 2020 +0100 patch 8.2.0332: some code in ex_getln.c not covered by tests Problem: Some code in ex_getln.c not covered by tests. Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5710)
author Bram Moolenaar <Bram@vim.org>
date Sat, 29 Feb 2020 14:30:03 +0100
parents 8e9e9124c7a2
children ed4d7ab9dcdc
line wrap: on
line diff
--- a/src/testdir/test_arabic.vim
+++ b/src/testdir/test_arabic.vim
@@ -562,3 +562,26 @@ func Test_shape_combination_isolated()
   set arabicshape&
   bwipe!
 endfunc
+
+" Test for entering arabic character in a search command
+func Test_arabic_chars_in_search_cmd()
+  new
+  set arabic
+  call feedkeys("i\nsghl!\<C-^>vim\<C-^>", 'tx')
+  call cursor(1, 1)
+  call feedkeys("/^sghl!\<C-^>vim$\<C-^>\<CR>", 'tx')
+  call assert_equal([2, 1], [line('.'), col('.')])
+
+  " Try searching in left-to-right mode
+  set rightleftcmd=
+  call cursor(1, 1)
+  call feedkeys("/^sghl!\<C-^>vim$\<CR>", 'tx')
+  call assert_equal([2, 1], [line('.'), col('.')])
+
+  set rightleftcmd&
+  set rightleft&
+  set arabic&
+  bwipe!
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab