diff src/testdir/test_vim9_script.vim @ 21618:9ab43576a13b v8.2.1359

patch 8.2.1359: Vim9: cannot assign to / register in Vim9 script Commit: https://github.com/vim/vim/commit/83144546488b544a1fe4e2a4f8be954b98c696fc Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 2 20:40:43 2020 +0200 patch 8.2.1359: Vim9: cannot assign to / register in Vim9 script Problem: Vim9: cannot assign to / register in Vim9 script. Solution: Adjust check for assignment in Vim9 script. (closes https://github.com/vim/vim/issues/6567)
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Aug 2020 20:45:04 +0200
parents 6af96a5f09f0
children a640bc762196
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -423,6 +423,23 @@ def Test_assignment_vim9script()
     let ll =
           Func()
     assert_equal([1, 2], ll)
+
+    @/ = 'text'
+    assert_equal('text', @/)
+    @0 = 'zero'
+    assert_equal('zero', @0)
+    @1 = 'one'
+    assert_equal('one', @1)
+    @9 = 'nine'
+    assert_equal('nine', @9)
+    @- = 'minus'
+    assert_equal('minus', @-)
+    if has('clipboard_working')
+      @* = 'star'
+      assert_equal('star', @*)
+      @+ = 'plus'
+      assert_equal('plus', @+)
+    endif
   END
   CheckScriptSuccess(lines)
 enddef