comparison src/testdir/test_partial.vim @ 15406:63b02fcf1361 v8.1.0711

patch 8.1.0711: test files still use function! commit https://github.com/vim/vim/commit/1e1153600c0377472d62cc553173fe555ddcf5a7 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 9 23:01:02 2019 +0100 patch 8.1.0711: test files still use function! Problem: Test files still use function!. Solution: Remove the exclamation mark. Fix overwriting a function.
author Bram Moolenaar <Bram@vim.org>
date Wed, 09 Jan 2019 23:15:05 +0100
parents 95ad2692dec0
children 2b4c138bf8e9
comparison
equal deleted inserted replaced
15405:3a8785d45112 15406:63b02fcf1361
112 112
113 func Test_function_in_dict() 113 func Test_function_in_dict()
114 call OuterCall() 114 call OuterCall()
115 endfunc 115 endfunc
116 116
117 function! s:cache_clear() dict 117 func s:cache_clear() dict
118 return self.name 118 return self.name
119 endfunction 119 endfunc
120 120
121 func Test_script_function_in_dict() 121 func Test_script_function_in_dict()
122 let s:obj = {'name': 'foo'} 122 let s:obj = {'name': 'foo'}
123 let s:obj2 = {'name': 'bar'} 123 let s:obj2 = {'name': 'bar'}
124 124
134 call assert_equal('bar', s:obj2.clear()) 134 call assert_equal('bar', s:obj2.clear())
135 let B = s:obj2.clear 135 let B = s:obj2.clear
136 call assert_equal('bar', B()) 136 call assert_equal('bar', B())
137 endfunc 137 endfunc
138 138
139 function! s:cache_arg(arg) dict 139 func s:cache_arg(arg) dict
140 let s:result = self.name . '/' . a:arg 140 let s:result = self.name . '/' . a:arg
141 return s:result 141 return s:result
142 endfunction 142 endfunc
143 143
144 func Test_script_function_in_dict_arg() 144 func Test_script_function_in_dict_arg()
145 let s:obj = {'name': 'foo'} 145 let s:obj = {'name': 'foo'}
146 let s:obj['clear'] = function('s:cache_arg') 146 let s:obj['clear'] = function('s:cache_arg')
147 147