Mercurial > vim
comparison src/testdir/test_textprop.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 | 647ef636a11e |
children | d067be761cd7 |
comparison
equal
deleted
inserted
replaced
20177:b3cf5433ecad | 20178:2fb397573541 |
---|---|
1202 \ prop_find(#{type: 'test', lnum: 1})) | 1202 \ prop_find(#{type: 'test', lnum: 1})) |
1203 | 1203 |
1204 bwipe! | 1204 bwipe! |
1205 call prop_type_delete('test') | 1205 call prop_type_delete('test') |
1206 endfunc | 1206 endfunc |
1207 | |
1208 " Test for passing invalid arguments to prop_xxx() functions | |
1209 func Test_prop_func_invalid_args() | |
1210 call assert_fails('call prop_clear(1, 2, [])', 'E715:') | |
1211 call assert_fails('call prop_clear(-1, 2)', 'E16:') | |
1212 call assert_fails('call prop_find(test_null_dict())', 'E474:') | |
1213 call assert_fails('call prop_find({"bufnr" : []})', 'E158:') | |
1214 call assert_fails('call prop_find({})', 'E968:') | |
1215 call assert_fails('call prop_find({}, "x")', 'E474:') | |
1216 call assert_fails('call prop_find({"lnum" : -2})', 'E16:') | |
1217 call assert_fails('call prop_list(1, [])', 'E715:') | |
1218 call assert_fails('call prop_list(-1 , {})', 'E16:') | |
1219 call assert_fails('call prop_remove([])', 'E474:') | |
1220 call assert_fails('call prop_remove({}, -2)', 'E16:') | |
1221 call assert_fails('call prop_remove({})', 'E968:') | |
1222 call assert_fails('call prop_type_add([], {})', 'E474:') | |
1223 call assert_fails("call prop_type_change('long', {'xyz' : 10})", 'E971:') | |
1224 call assert_fails("call prop_type_delete([])", 'E474:') | |
1225 call assert_fails("call prop_type_delete('xyz', [])", 'E715:') | |
1226 call assert_fails("call prop_type_get([])", 'E474:') | |
1227 call assert_fails("call prop_type_get('', [])", 'E474:') | |
1228 call assert_fails("call prop_type_list([])", 'E715:') | |
1229 endfunc | |
1230 | |
1231 " vim: shiftwidth=2 sts=2 expandtab |