Mercurial > vim
diff src/testdir/test_textprop.vim @ 23072:4b398a229b0b v8.2.2082
patch 8.2.2082: Vim9: can still use the depricated #{} dict syntax
Commit: https://github.com/vim/vim/commit/e0de171ecd2ff7acd56deda2cf81f0d13a69c803
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Dec 2 17:36:54 2020 +0100
patch 8.2.2082: Vim9: can still use the depricated #{} dict syntax
Problem: Vim9: can still use the depricated #{} dict syntax.
Solution: Remove support for #{} in Vim9 script. (closes https://github.com/vim/vim/issues/7406, closes https://github.com/vim/vim/issues/7405)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 02 Dec 2020 17:45:05 +0100 |
parents | 166a0f17b05e |
children | 90ea5037a7e3 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -219,15 +219,15 @@ def Test_prop_find2() # Multiple props per line, start on the first, should find the second. new ['the quikc bronw fox jumsp over the layz dog']->repeat(2)->setline(1) - prop_type_add('misspell', #{highlight: 'ErrorMsg'}) + prop_type_add('misspell', {highlight: 'ErrorMsg'}) for lnum in [1, 2] for col in [8, 14, 24, 38] - prop_add(lnum, col, #{type: 'misspell', length: 2}) + prop_add(lnum, col, {type: 'misspell', length: 2}) endfor endfor cursor(1, 8) - var expected = {'lnum': 1, 'id': 0, 'col': 14, 'end': 1, 'type': 'misspell', 'length': 2, 'start': 1} - var result = prop_find(#{type: 'misspell', skipstart: true}, 'f') + var expected = {lnum: 1, id: 0, col: 14, end: 1, type: 'misspell', length: 2, start: 1} + var result = prop_find({type: 'misspell', skipstart: true}, 'f') assert_equal(expected, result) prop_type_delete('misspell') @@ -322,7 +322,7 @@ func Test_prop_remove() endfunc def Test_prop_add_vim9() - prop_type_add('comment', #{ + prop_type_add('comment', { highlight: 'Directory', priority: 123, start_incl: true, @@ -336,7 +336,7 @@ def Test_prop_remove_vim9() new AddPropTypes() SetupPropsInFirstLine() - assert_equal(1, prop_remove({'type': 'three', 'id': 13, 'both': true, 'all': true})) + assert_equal(1, prop_remove({type: 'three', id: 13, both: true, all: true})) DeletePropTypes() bwipe! enddef