mirror of
https://github.com/vim/vim.git
synced 2025-11-01 10:07:16 -04:00
patch 9.0.0444: trying to declare g:variable gives confusing error
Problem: Trying to declare g:variable gives confusing error. Solution: Give a better error message. (closes #11108)
This commit is contained in:
@@ -1936,7 +1936,7 @@ def Test_var_not_cmd()
|
||||
var lines =<< trim END
|
||||
g:notexist:cmd
|
||||
END
|
||||
v9.CheckDefAndScriptFailure(lines, ['E488: Trailing characters: :cmd', 'E121: Undefined variable: g:notexist'], 1)
|
||||
v9.CheckDefAndScriptFailure(lines, ['E1016: Cannot declare a global variable: g:notexist', "E1069: White space required after ':'"], 1)
|
||||
|
||||
lines =<< trim END
|
||||
g-pat-cmd
|
||||
@@ -1950,7 +1950,7 @@ def Test_var_not_cmd()
|
||||
lines =<< trim END
|
||||
s:notexist:repl
|
||||
END
|
||||
v9.CheckDefAndScriptFailure(lines, ['E488: Trailing characters: :repl', 'E1268:'], 1)
|
||||
v9.CheckDefAndScriptFailure(lines, ['E1101: Cannot declare a script variable in a function: s:notexist', "E1069: White space required after ':'"], 1)
|
||||
|
||||
lines =<< trim END
|
||||
notexist:repl
|
||||
|
||||
Reference in New Issue
Block a user