comparison src/testdir/test_textprop.vim @ 24039:a5478836fcb7 v8.2.2561

patch 8.2.2561: not all textprop code is covered by tests Commit: https://github.com/vim/vim/commit/3dc3474f00e529b014add48f7f3d1dad2ec15498 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 2 13:36:47 2021 +0100 patch 8.2.2561: not all textprop code is covered by tests Problem: Not all textprop code is covered by tests. Solution: Add a few more test cases. (Dominique Pell?, closes https://github.com/vim/vim/issues/7908)
author Bram Moolenaar <Bram@vim.org>
date Tue, 02 Mar 2021 13:45:05 +0100
parents 6793853063e5
children 7422f2f719a3
comparison
equal deleted inserted replaced
24038:52c3c86b10f1 24039:a5478836fcb7
1336 call assert_fails("call prop_type_delete([])", 'E730:') 1336 call assert_fails("call prop_type_delete([])", 'E730:')
1337 call assert_fails("call prop_type_delete('xyz', [])", 'E715:') 1337 call assert_fails("call prop_type_delete('xyz', [])", 'E715:')
1338 call assert_fails("call prop_type_get([])", 'E730:') 1338 call assert_fails("call prop_type_get([])", 'E730:')
1339 call assert_fails("call prop_type_get('', [])", 'E474:') 1339 call assert_fails("call prop_type_get('', [])", 'E474:')
1340 call assert_fails("call prop_type_list([])", 'E715:') 1340 call assert_fails("call prop_type_list([])", 'E715:')
1341 call assert_fails("call prop_type_add('yyy', 'not_a_dict')", 'E715:')
1342 call assert_fails("call prop_add(1, 5, {'type':'missing_type', 'length':1})", 'E971:')
1343 call assert_fails("call prop_add(1, 5, {'type': ''})", 'E971:')
1344 call assert_fails('call prop_add(1, 1, 0)', 'E715:')
1345
1346 new
1347 call setline(1, ['first', 'second'])
1348 call prop_type_add('xxx', {})
1349
1350 call assert_fails("call prop_type_add('xxx', {})", 'E969:')
1351 call assert_fails("call prop_add(2, 0, {'type': 'xxx'})", 'E964:')
1352 call assert_fails("call prop_add(2, 3, {'type': 'xxx', 'end_lnum':1})", 'E475:')
1353 call assert_fails("call prop_add(2, 3, {'type': 'xxx', 'end_lnum':3})", 'E966:')
1354 call assert_fails("call prop_add(2, 3, {'type': 'xxx', 'length':-1})", 'E475:')
1355 call assert_fails("call prop_add(2, 3, {'type': 'xxx', 'end_col':0})", 'E475:')
1356 call assert_fails("call prop_add(2, 3, {'length':1})", 'E965:')
1357
1358 call prop_type_delete('xxx')
1359 bwipe!
1341 endfunc 1360 endfunc
1342 1361
1343 func Test_prop_split_join() 1362 func Test_prop_split_join()
1344 new 1363 new
1345 call prop_type_add('test', {'highlight': 'ErrorMsg'}) 1364 call prop_type_add('test', {'highlight': 'ErrorMsg'})