Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
27206:db4583616f61 | 27207:7b8e2bea0ec5 |
---|---|
1431 END | 1431 END |
1432 CheckScriptFailure(lines, 'E121: Undefined variable: autoload') | 1432 CheckScriptFailure(lines, 'E121: Undefined variable: autoload') |
1433 | 1433 |
1434 lines =<< trim END | 1434 lines =<< trim END |
1435 vim9script | 1435 vim9script |
1436 import autoload './doesNotExist.vim' | |
1437 END | |
1438 CheckScriptFailure(lines, 'E1264:') | |
1439 | |
1440 lines =<< trim END | |
1441 vim9script | |
1442 import autoload '/dir/doesNotExist.vim' | |
1443 END | |
1444 CheckScriptFailure(lines, 'E1264:') | |
1445 | |
1446 lines =<< trim END | |
1447 vim9script | |
1436 import autoload 'doesNotExist.vim' | 1448 import autoload 'doesNotExist.vim' |
1437 END | 1449 END |
1438 CheckScriptFailure(lines, 'E1264:') | 1450 CheckScriptFailure(lines, 'E1053: Could not import "doesNotExist.vim"') |
1439 enddef | 1451 enddef |
1440 | 1452 |
1441 " test disassembling an auto-loaded function starting with "debug" | 1453 " test disassembling an auto-loaded function starting with "debug" |
1442 def Test_vim9_autoload_disass() | 1454 def Test_vim9_autoload_disass() |
1443 mkdir('Xdir/autoload', 'p') | 1455 mkdir('Xdir/autoload', 'p') |