summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_arabic.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-29 14:23:58 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-29 14:23:58 +0100
commitd30ae2fc4acb3861fc7dc9618c1f90eee997d412 (patch)
tree747555451d703f87262a46867fe178e0651b7616 /src/testdir/test_arabic.vim
parent7c215c58936cbebd4132ad6112d04db54b7c153e (diff)
patch 8.2.0332: some code in ex_getln.c not covered by testsv8.2.0332
Problem: Some code in ex_getln.c not covered by tests. Solution: Add a few more tests. (Yegappan Lakshmanan, closes #5710)
Diffstat (limited to 'src/testdir/test_arabic.vim')
-rw-r--r--src/testdir/test_arabic.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_arabic.vim b/src/testdir/test_arabic.vim
index b679ec4520..272937387d 100644
--- 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