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 #8779)
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 0fa65d1..31f20cb 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -556,7 +556,34 @@
@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()