comparison src/testdir/test_listener.vim @ 20178:2fb397573541

patch 8.2.0644: insufficient testing for invalid function arguments Commit: https://github.com/vim/vim/commit/99fa721944dda9d07c53c907c33466728df5c271 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 26 15:59:55 2020 +0200 patch 8.2.0644: insufficient testing for invalid function arguments Problem: Insufficient testing for invalid function arguments. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5988)
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 Apr 2020 16:00:04 +0200
parents f3162c3ed128
children 6a4806e326dd
comparison
equal deleted inserted replaced
20177:b3cf5433ecad 20178:2fb397573541
205 call listener_flush() 205 call listener_flush()
206 call assert_equal([{'lnum': 2, 'end': 2, 'col': 1, 'added': 1}], s:list) 206 call assert_equal([{'lnum': 2, 'end': 2, 'col': 1, 'added': 1}], s:list)
207 207
208 call listener_remove(id) 208 call listener_remove(id)
209 bwipe! 209 bwipe!
210
211 " Invalid arguments
212 call assert_fails('call listener_add([])', 'E921:')
213 call assert_fails('call listener_add("s:StoreListArgs", [])', 'E158:')
214 call assert_fails('call listener_flush([])', 'E158:')
210 endfunc 215 endfunc
211 216
212 func s:StoreBufList(buf, start, end, added, list) 217 func s:StoreBufList(buf, start, end, added, list)
213 let s:bufnr = a:buf 218 let s:bufnr = a:buf
214 let s:list = a:list 219 let s:list = a:list