To: vim_dev@googlegroups.com Subject: Patch 8.2.2561 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2561 Problem: Not all textprop code is covered by tests. Solution: Add a few more test cases. (Dominique Pellé, closes #7908) Files: src/testdir/test_textprop.vim *** ../vim-8.2.2560/src/testdir/test_textprop.vim 2021-02-10 17:19:52.614643725 +0100 --- src/testdir/test_textprop.vim 2021-03-02 13:35:21.201436251 +0100 *************** *** 1338,1343 **** --- 1338,1362 ---- call assert_fails("call prop_type_get([])", 'E730:') call assert_fails("call prop_type_get('', [])", 'E474:') call assert_fails("call prop_type_list([])", 'E715:') + call assert_fails("call prop_type_add('yyy', 'not_a_dict')", 'E715:') + call assert_fails("call prop_add(1, 5, {'type':'missing_type', 'length':1})", 'E971:') + call assert_fails("call prop_add(1, 5, {'type': ''})", 'E971:') + call assert_fails('call prop_add(1, 1, 0)', 'E715:') + + new + call setline(1, ['first', 'second']) + call prop_type_add('xxx', {}) + + call assert_fails("call prop_type_add('xxx', {})", 'E969:') + call assert_fails("call prop_add(2, 0, {'type': 'xxx'})", 'E964:') + call assert_fails("call prop_add(2, 3, {'type': 'xxx', 'end_lnum':1})", 'E475:') + call assert_fails("call prop_add(2, 3, {'type': 'xxx', 'end_lnum':3})", 'E966:') + call assert_fails("call prop_add(2, 3, {'type': 'xxx', 'length':-1})", 'E475:') + call assert_fails("call prop_add(2, 3, {'type': 'xxx', 'end_col':0})", 'E475:') + call assert_fails("call prop_add(2, 3, {'length':1})", 'E965:') + + call prop_type_delete('xxx') + bwipe! endfunc func Test_prop_split_join() *** ../vim-8.2.2560/src/version.c 2021-03-01 21:02:42.686928992 +0100 --- src/version.c 2021-03-02 13:36:32.285258342 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2561, /**/ -- Living on Earth includes an annual free trip around the Sun. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///