diff src/testdir/test_vim9_cmd.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 ec23d84a096d
children b6aadb0b3a56
line wrap: on
line diff
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -251,18 +251,18 @@ def Test_skipped_expr_linebreak()
 enddef
 
 def Test_dict_member()
-   var test: dict<list<number>> = {'data': [3, 1, 2]}
+   var test: dict<list<number>> = {data: [3, 1, 2]}
    test.data->sort()
-   assert_equal(#{data: [1, 2, 3]}, test)
+   assert_equal({data: [1, 2, 3]}, test)
    test.data
       ->reverse()
-   assert_equal(#{data: [3, 2, 1]}, test)
+   assert_equal({data: [3, 2, 1]}, test)
 
   var lines =<< trim END
       vim9script
-      var test: dict<list<number>> = {'data': [3, 1, 2]}
+      var test: dict<list<number>> = {data: [3, 1, 2]}
       test.data->sort()
-      assert_equal(#{data: [1, 2, 3]}, test)
+      assert_equal({data: [1, 2, 3]}, test)
   END
   CheckScriptSuccess(lines)
 enddef
@@ -308,9 +308,9 @@ def Test_bar_after_command()
 enddef
 
 def Test_filter_is_not_modifier()
-  var tags = [{'a': 1, 'b': 2}, {'x': 3, 'y': 4}]
+  var tags = [{a: 1, b: 2}, {x: 3, y: 4}]
   filter(tags, { _, v -> has_key(v, 'x') ? 1 : 0 })
-  assert_equal([#{x: 3, y: 4}], tags)
+  assert_equal([{x: 3, y: 4}], tags)
 enddef
 
 def Test_command_modifier_filter()