comparison src/testdir/vim9.vim @ 20170:0612c64a2b87 v8.2.0640

patch 8.2.0640: Vim9: expanding does not work Commit: https://github.com/vim/vim/commit/cfe435d7feacf123ac060747b885f7c4328062ea Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 25 20:02:55 2020 +0200 patch 8.2.0640: Vim9: expanding does not work Problem: Vim9: expanding does not work. Solution: Find wildcards in not compiled commands. Reorganize test files.
author Bram Moolenaar <Bram@vim.org>
date Sat, 25 Apr 2020 20:15:03 +0200
parents
children ce1b73835822
comparison
equal deleted inserted replaced
20169:bd970e6fa5d4 20170:0612c64a2b87
1 " Utility functions for testing vim9 script
2
3 " Check that "lines" inside ":def" results in an "error" message.
4 func CheckDefFailure(lines, error)
5 call writefile(['def Func()'] + a:lines + ['enddef'], 'Xdef')
6 call assert_fails('so Xdef', a:error, a:lines)
7 call delete('Xdef')
8 endfunc
9
10 def CheckScriptFailure(lines: list<string>, error: string)
11 writefile(lines, 'Xdef')
12 assert_fails('so Xdef', error, lines)
13 delete('Xdef')
14 enddef
15
16 def CheckScriptSuccess(lines: list<string>)
17 writefile(lines, 'Xdef')
18 so Xdef
19 delete('Xdef')
20 enddef
21
22 " Check that "line" inside ":def" results in an "error" message when executed.
23 func CheckDefExecFailure(line, error)
24 call writefile(['def! Func()', a:line, 'enddef'], 'Xdef')
25 so Xdef
26 call assert_fails('call Func()', a:error, a:line)
27 call delete('Xdef')
28 endfunc