comparison src/testdir/test_indent.vim @ 30051:13b02c1ea0f7 v9.0.0363

patch 9.0.0363: common names in test files causes tests to be flaky Commit: https://github.com/vim/vim/commit/b18b49699776485150b71626069a40d12d2c5590 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 2 21:55:50 2022 +0100 patch 9.0.0363: common names in test files causes tests to be flaky Problem: Common names in test files causes tests to be flaky. Solution: Use more specific names.
author Bram Moolenaar <Bram@vim.org>
date Fri, 02 Sep 2022 23:00:04 +0200
parents a2c89e5446b7
children f08ed0738f7a
comparison
equal deleted inserted replaced
30050:4d0a9c80a90c 30051:13b02c1ea0f7
159 let modeline = &modeline 159 let modeline = &modeline
160 set modeline 160 set modeline
161 func GetIndent() 161 func GetIndent()
162 return line('.') * 2 162 return line('.') * 2
163 endfunc 163 endfunc
164 call writefile(['# vim: indentexpr=GetIndent()'], 'Xfile.txt') 164 call writefile(['# vim: indentexpr=GetIndent()'], 'Xmlfile.txt')
165 set modelineexpr 165 set modelineexpr
166 new Xfile.txt 166 new Xmlfile.txt
167 call assert_equal('GetIndent()', &indentexpr) 167 call assert_equal('GetIndent()', &indentexpr)
168 exe "normal Oa\nb\n" 168 exe "normal Oa\nb\n"
169 call assert_equal([' a', ' b'], getline(1, 2)) 169 call assert_equal([' a', ' b'], getline(1, 2))
170 170
171 set modelineexpr& 171 set modelineexpr&
172 delfunc GetIndent 172 delfunc GetIndent
173 let &modeline = modeline 173 let &modeline = modeline
174 close! 174 close!
175 call delete('Xfile.txt') 175 call delete('Xmlfile.txt')
176 endfunc 176 endfunc
177 177
178 func Test_indent_func_with_gq() 178 func Test_indent_func_with_gq()
179 179
180 function GetTeXIndent() 180 function GetTeXIndent()