comparison src/testdir/gen_opt_test.vim @ 11203:c3504890b37d v8.0.0488

patch 8.0.0488: running tests leaves an "xxx" file behind commit https://github.com/vim/vim/commit/b4c5572e749063daeef30cfc2932bea1fd468165 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 19 19:11:35 2017 +0100 patch 8.0.0488: running tests leaves an "xxx" file behind Problem: Running tests leaves an "xxx" file behind. Solution: Delete the 'verbosefile' after resetting the option.
author Christian Brabandt <cb@256bit.org>
date Sun, 19 Mar 2017 19:15:04 +0100
parents d32c9d8fa01a
children fc1939947789
comparison
equal deleted inserted replaced
11202:d451f8432152 11203:c3504890b37d
173 call add(script, 'set no' . shortname) 173 call add(script, 'set no' . shortname)
174 else 174 else
175 for val in a[0] 175 for val in a[0]
176 call add(script, 'set ' . name . '=' . val) 176 call add(script, 'set ' . name . '=' . val)
177 call add(script, 'set ' . shortname . '=' . val) 177 call add(script, 'set ' . shortname . '=' . val)
178
179 if name == 'verbosefile' && !empty(val)
180 call add(script, 'call delete("'. val. '")')
181 endif
182 endfor 178 endfor
183 179
184 " setting an option can only fail when it's implemented. 180 " setting an option can only fail when it's implemented.
185 call add(script, "if exists('+" . name . "')") 181 call add(script, "if exists('+" . name . "')")
186 for val in a[1] 182 for val in a[1]
190 call add(script, "endif") 186 call add(script, "endif")
191 endif 187 endif
192 188
193 call add(script, 'set ' . name . '&') 189 call add(script, 'set ' . name . '&')
194 call add(script, 'set ' . shortname . '&') 190 call add(script, 'set ' . shortname . '&')
191 if name == 'verbosefile'
192 call add(script, 'call delete("xxx")')
193 endif
195 194
196 if name == 'more' 195 if name == 'more'
197 call add(script, 'set nomore') 196 call add(script, 'set nomore')
198 elseif name == 'lines' 197 elseif name == 'lines'
199 call add(script, 'let &lines = save_lines') 198 call add(script, 'let &lines = save_lines')