Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 26556:dff04b7fa6b2 v8.2.3807
patch 8.2.3807: Vim9: can call import with star directly
Commit: https://github.com/vim/vim/commit/f8a79fc3468645019532331bf8b36d1f7b403ef4
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 14 12:06:16 2021 +0000
patch 8.2.3807: Vim9: can call import with star directly
Problem: Vim9: can call import with star directly.
Solution: Check that the import used star.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 14 Dec 2021 13:15:03 +0100 |
parents | 4a1d2abc2016 |
children | a07323eb647f |
comparison
equal
deleted
inserted
replaced
26555:2ea8b67ac427 | 26556:dff04b7fa6b2 |
---|---|
1534 import * as g:foo from './Xfoo.vim' | 1534 import * as g:foo from './Xfoo.vim' |
1535 END | 1535 END |
1536 CheckScriptFailure(lines, 'E1047:') | 1536 CheckScriptFailure(lines, 'E1047:') |
1537 | 1537 |
1538 delete('Xfoo.vim') | 1538 delete('Xfoo.vim') |
1539 | |
1540 lines =<< trim END | |
1541 vim9script | |
1542 def TheFunc() | |
1543 echo 'the func' | |
1544 enddef | |
1545 export var Ref = TheFunc | |
1546 END | |
1547 writefile([], 'Xthat.vim') | |
1548 lines =<< trim END | |
1549 import * as That from './Xthat.vim' | |
1550 That() | |
1551 END | |
1552 CheckDefAndScriptFailure2(lines, 'E1094:', 'E1236: Cannot use That itself') | |
1553 delete('Xthat.vim') | |
1539 enddef | 1554 enddef |
1540 | 1555 |
1541 def Test_import_as() | 1556 def Test_import_as() |
1542 var export_lines =<< trim END | 1557 var export_lines =<< trim END |
1543 vim9script | 1558 vim9script |