comparison src/testdir/test_textprop.vim @ 19601:67f39cb0a49c v8.2.0357

patch 8.2.0357: cannot delete a text property matching both id and type Commit: https://github.com/vim/vim/commit/49b79bd4888341d527c95f2aa73ed953203ce2b6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 5 21:52:55 2020 +0100 patch 8.2.0357: cannot delete a text property matching both id and type Problem: Cannot delete a text property matching both id and type. (Axel Forsman) Solution: Add the "both" argument.
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 Mar 2020 22:00:04 +0100
parents 36ec10251b2b
children 1d493fce1fbd
comparison
equal deleted inserted replaced
19600:911eb7bbfebb 19601:67f39cb0a49c
265 unlet props[1] 265 unlet props[1]
266 call assert_equal(props, prop_list(1)) 266 call assert_equal(props, prop_list(1))
267 267
268 " remove from unknown buffer 268 " remove from unknown buffer
269 call assert_fails("call prop_remove({'type': 'one', 'bufnr': 123456}, 1)", 'E158:') 269 call assert_fails("call prop_remove({'type': 'one', 'bufnr': 123456}, 1)", 'E158:')
270
271 call DeletePropTypes()
272 bwipe!
273
274 new
275 call AddPropTypes()
276 call SetupPropsInFirstLine()
277 call prop_add(1, 6, {'length': 2, 'id': 11, 'type': 'three'})
278 let props = Get_expected_props()
279 call insert(props, {'col': 6, 'length': 2, 'id': 11, 'type': 'three', 'start': 1, 'end': 1}, 3)
280 call assert_equal(props, prop_list(1))
281 call assert_equal(1, prop_remove({'type': 'three', 'id': 11, 'both': 1, 'all': 1}, 1))
282 unlet props[3]
283 call assert_equal(props, prop_list(1))
284
285 call assert_fails("call prop_remove({'id': 11, 'both': 1})", 'E860')
286 call assert_fails("call prop_remove({'type': 'three', 'both': 1})", 'E860')
270 287
271 call DeletePropTypes() 288 call DeletePropTypes()
272 bwipe! 289 bwipe!
273 endfunc 290 endfunc
274 291