Lines Matching refs:error

6 " Check that "lines" inside a ":def" function has no error.
22 " Check that "lines" inside ":def" results in an "error" message.
23 " If "lnum" is given check that the error is reported for this line.
26 func CheckDefFailure(lines, error, lnum = -3) argument
32 call assert_fails('so ' .. fname, a:error, a:lines, a:lnum + 1)
40 " Check that "lines" inside ":def" results in an "error" message when executed.
41 " If "lnum" is given check that the error is reported for this line.
44 func CheckDefExecFailure(lines, error, lnum = -3) argument
51 call assert_fails('call Func()', a:error, a:lines, a:lnum + 1)
59 def CheckScriptFailure(lines: list<string>, error: string, lnum = -3)
65 assert_fails('so ' .. fname, error, lines, lnum)
103 " Check that a command fails with the same error when used in a :def function
105 def CheckDefAndScriptFailure(lines: list<string>, error: string, lnum = -3)
106 CheckDefFailure(lines, error, lnum)
107 CheckScriptFailure(['vim9script'] + lines, error, lnum + 1)
120 " Check that a command fails with the same error when executed in a :def
122 def CheckDefExecAndScriptFailure(lines: list<string>, error: string, lnum = -3)
123 CheckDefExecFailure(lines, error, lnum)
124 CheckScriptFailure(['vim9script'] + lines, error, lnum + 1)
138 " Check that "lines" inside a legacy function has no error.
154 " Check that "lines" inside a legacy function results in the expected error
155 func CheckLegacyFailure(lines, error) argument
161 call assert_fails('so ' .. fname, a:error)
221 def CheckLegacyAndVim9Failure(lines: list<string>, error: any)
226 if type(error) == type('string')
227 legacyError = error
228 defError = error
229 scriptError = error
231 legacyError = error[0]
232 defError = error[1]
233 scriptError = error[2]