Mercurial > vim
comparison src/testdir/test_marks.vim @ 14319:f7e80dbb4f00 v8.1.0175
patch 8.1.0175: marks test fails in very wide window
commit https://github.com/vim/vim/commit/bde14d8e24f6b8ca409290733dbf11cb6fee5751
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 10 15:22:32 2018 +0200
patch 8.1.0175: marks test fails in very wide window
Problem: Marks test fails in very wide window. (Vladimir Lomov)
Solution: Extend the text to match 'columns'. (closes https://github.com/vim/vim/issues/3180, closes https://github.com/vim/vim/issues/3181)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 10 Jul 2018 15:30:07 +0200 |
parents | 8a4c0ab88201 |
children | 63b02fcf1361 |
comparison
equal
deleted
inserted
replaced
14318:465c0616f51b | 14319:f7e80dbb4f00 |
---|---|
124 func Test_marks_cmd_multibyte() | 124 func Test_marks_cmd_multibyte() |
125 if !has('multi_byte') | 125 if !has('multi_byte') |
126 return | 126 return |
127 endif | 127 endif |
128 new Xone | 128 new Xone |
129 call setline(1, ['ááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááá']) | 129 call setline(1, [repeat('á', &columns)]) |
130 norm! ma | 130 norm! ma |
131 | 131 |
132 let a = split(execute('marks a'), "\n") | 132 let a = split(execute('marks a'), "\n") |
133 call assert_equal(2, len(a)) | 133 call assert_equal(2, len(a)) |
134 let expected = ' a 1 0 ' | 134 let expected = ' a 1 0 ' . repeat('á', &columns - 16) |
135 while strwidth(expected) < &columns - 1 | |
136 let expected .= 'á' | |
137 endwhile | |
138 call assert_equal(expected, a[1]) | 135 call assert_equal(expected, a[1]) |
139 | 136 |
140 bwipe! | 137 bwipe! |
141 endfunc | 138 endfunc |