aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_number.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_number.vim')
-rw-r--r--src/nvim/testdir/test_number.vim25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_number.vim b/src/nvim/testdir/test_number.vim
index 81326bce14..eaabe3f67e 100644
--- a/src/nvim/testdir/test_number.vim
+++ b/src/nvim/testdir/test_number.vim
@@ -1,5 +1,6 @@
" Test for 'number' and 'relativenumber'
+source check.vim
source view_util.vim
func s:screen_lines(start, end) abort
@@ -263,3 +264,27 @@ func Test_relativenumber_uninitialised()
redraw
bwipe!
endfunc
+
+" Test for displaying line numbers with 'rightleft'
+func Test_number_rightleft()
+ CheckFeature rightleft
+ new
+ setlocal number
+ setlocal rightleft
+ call setline(1, range(1, 1000))
+ normal! 9Gzt
+ redraw!
+ call assert_match('^\s\+9 9$', Screenline(1))
+ normal! 10Gzt
+ redraw!
+ call assert_match('^\s\+01 10$', Screenline(1))
+ normal! 100Gzt
+ redraw!
+ call assert_match('^\s\+001 100$', Screenline(1))
+ normal! 1000Gzt
+ redraw!
+ call assert_match('^\s\+0001 1000$', Screenline(1))
+ bw!
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab