0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.3412: Vim9: importing the wrong file

Problem:    Vim9: importing the wrong file.
Solution:   Correct the file name.  Delete the file afterwards.
This commit is contained in:
Bram Moolenaar
2021-09-07 22:35:34 +02:00
parent 6853c38b78
commit af2d5d2ce2
2 changed files with 5 additions and 2 deletions

View File

@@ -1480,16 +1480,17 @@ enddef
def Test_import_star_fails()
writefile([], 'Xfoo.vim')
var lines =<< trim END
import * as foo from '/tmp/foo.vim'
import * as foo from './Xfoo.vim'
foo = 'bar'
END
CheckDefAndScriptFailure2(lines, 'E1094:', 'E1236: Cannot use foo itself')
lines =<< trim END
vim9script
import * as foo from '/tmp/foo.vim'
import * as foo from './Xfoo.vim'
var that = foo
END
CheckScriptFailure(lines, 'E1029: Expected ''.''')
delete('Xfoo.vim')
enddef
def Test_import_as()