Lines Matching refs:lines
6 " Check that "lines" inside a ":def" function has no error.
7 func CheckDefSuccess(lines) argument
11 call writefile(['def Func()'] + a:lines + ['enddef', 'defcompile'], fname)
22 " Check that "lines" inside ":def" results in an "error" message.
26 func CheckDefFailure(lines, error, lnum = -3) argument
30 …call writefile(['def Func()', '# comment'] + a:lines + ['#comment', 'enddef', 'defcompile'], fname)
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.
44 func CheckDefExecFailure(lines, error, lnum = -3) argument
48 call writefile(['def Func()', '# comment'] + a:lines + ['#comment', 'enddef'], fname)
51 call assert_fails('call Func()', a:error, a:lines, a:lnum + 1)
59 def CheckScriptFailure(lines: list<string>, error: string, lnum = -3)
63 writefile(lines, fname)
65 assert_fails('so ' .. fname, error, lines, lnum)
72 def CheckScriptFailureList(lines: list<string>, errors: list<string>, lnum = -3)
76 writefile(lines, fname)
78 assert_fails('so ' .. fname, errors, lines, lnum)
85 def CheckScriptSuccess(lines: list<string>)
89 writefile(lines, fname)
98 def CheckDefAndScriptSuccess(lines: list<string>)
99 CheckDefSuccess(lines)
100 CheckScriptSuccess(['vim9script'] + lines)
105 def CheckDefAndScriptFailure(lines: list<string>, error: string, lnum = -3)
106 CheckDefFailure(lines, error, lnum)
107 CheckScriptFailure(['vim9script'] + lines, error, lnum + 1)
112 lines: list<string>,
116 CheckDefFailure(lines, errorDef, lnum)
117 CheckScriptFailure(['vim9script'] + lines, errorScript, lnum + 1)
122 def CheckDefExecAndScriptFailure(lines: list<string>, error: string, lnum = -3)
123 CheckDefExecFailure(lines, error, lnum)
124 CheckScriptFailure(['vim9script'] + lines, error, lnum + 1)
129 lines: list<string>,
133 CheckDefExecFailure(lines, errorDef, lnum)
134 CheckScriptFailure(['vim9script'] + lines, errorScript, lnum + 1)
138 " Check that "lines" inside a legacy function has no error.
139 func CheckLegacySuccess(lines) argument
143 call writefile(['func Func()'] + a:lines + ['endfunc'], fname)
154 " Check that "lines" inside a legacy function results in the expected error
155 func CheckLegacyFailure(lines, error) argument
159 call writefile(['func Func()'] + a:lines + ['endfunc', 'call Func()'], fname)
169 " Execute "lines" in a legacy function, translated as in
171 def CheckTransLegacySuccess(lines: list<string>)
172 var legacylines = lines->mapnew((_, v) =>
182 " Execute "lines" in a :def function, translated as in
184 def CheckTransDefSuccess(lines: list<string>)
185 var vim9lines = lines->mapnew((_, v) =>
194 " Execute "lines" in a Vim9 script, translated as in
196 def CheckTransVim9Success(lines: list<string>)
197 var vim9lines = lines->mapnew((_, v) =>
206 " Execute "lines" in a legacy function, :def function and Vim9 script.
211 def CheckLegacyAndVim9Success(lines: list<string>)
212 CheckTransLegacySuccess(lines)
213 CheckTransDefSuccess(lines)
214 CheckTransVim9Success(lines)
217 " Execute "lines" in a legacy function, :def function and Vim9 script.
221 def CheckLegacyAndVim9Failure(lines: list<string>, error: any)
236 var legacylines = lines->mapnew((_, v) =>
242 var vim9lines = lines->mapnew((_, v) =>