Mercurial > vim
diff src/testdir/test_vim9_import.vim @ 27207:7b8e2bea0ec5 v8.2.4132
patch 8.2.4132: Vim9: wrong error message when autoload script can't be found
Commit: https://github.com/vim/vim/commit/1836d6157828baddd94e1f2c82488031570e444d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 18 13:14:47 2022 +0000
patch 8.2.4132: Vim9: wrong error message when autoload script can't be found
Problem: Vim9: wrong error message when autoload script can't be found.
Solution: Correct check for using autoload with wrong name.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 18 Jan 2022 14:15:06 +0100 |
parents | 6c177a9b436e |
children | 42561e956a70 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_import.vim +++ b/src/testdir/test_vim9_import.vim @@ -1433,9 +1433,21 @@ def Test_import_autoload_fails() lines =<< trim END vim9script + import autoload './doesNotExist.vim' + END + CheckScriptFailure(lines, 'E1264:') + + lines =<< trim END + vim9script + import autoload '/dir/doesNotExist.vim' + END + CheckScriptFailure(lines, 'E1264:') + + lines =<< trim END + vim9script import autoload 'doesNotExist.vim' END - CheckScriptFailure(lines, 'E1264:') + CheckScriptFailure(lines, 'E1053: Could not import "doesNotExist.vim"') enddef " test disassembling an auto-loaded function starting with "debug"