diff src/testdir/test_vim9_cmd.vim @ 26228:269ecc6d69bc v8.2.3645

patch 8.2.3645: Vim9: The "no effect" error is not given for all registers Commit: https://github.com/vim/vim/commit/7d5b8becc342e49e491053ea842e59f82d072001 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 22 15:05:46 2021 +0000 patch 8.2.3645: Vim9: The "no effect" error is not given for all registers Problem: Vim9: The "no effect" error is not given for all registers. Solution: Include any character following '@'. (closes https://github.com/vim/vim/issues/8779)
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Nov 2021 16:15:04 +0100
parents eaa97adb0732
children 640b62dbf6cb
line wrap: on
line diff
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -556,7 +556,34 @@ def Test_use_register()
       @a = 'echo "text"'
       @a
   END
-  CheckDefAndScriptFailure(lines, 'E1207:')
+  CheckDefAndScriptFailure(lines, 'E1207:', 2)
+
+  lines =<< trim END
+      @/ = 'pattern'
+      @/
+  END
+  CheckDefAndScriptFailure(lines, 'E1207:', 2)
+
+  lines =<< trim END
+      &opfunc = 'nothing'
+      &opfunc
+  END
+  CheckDefAndScriptFailure(lines, 'E1207:', 2)
+  &opfunc = ''
+
+  lines =<< trim END
+      &l:showbreak = 'nothing'
+      &l:showbreak
+  END
+  CheckDefAndScriptFailure(lines, 'E1207:', 2)
+  &l:showbreak = ''
+
+  lines =<< trim END
+      &g:showbreak = 'nothing'
+      &g:showbreak
+  END
+  CheckDefAndScriptFailure(lines, 'E1207:', 2)
+  &g:showbreak = ''
 enddef
 
 def Test_environment_use_linebreak()