Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 25751:fc8046209eaa v8.2.3411
patch 8.2.3411: Vim9: crash when using base name of import
Commit: https://github.com/vim/vim/commit/6853c38b78fe5333f95470e1ff3ca6741247e600
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 7 22:12:19 2021 +0200
patch 8.2.3411: Vim9: crash when using base name of import
Problem: Vim9: crash when using base name of import. (Naohiro Ono)
Solution: Check the import flags. (closes https://github.com/vim/vim/issues/8843)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 Sep 2021 22:15:03 +0200 |
parents | fe7f45e2895e |
children | c50b3eff7a64 |
comparison
equal
deleted
inserted
replaced
25750:06e0400d9d69 | 25751:fc8046209eaa |
---|---|
1475 assert_equal(newcpo, g:cpo_after_vim9script) | 1475 assert_equal(newcpo, g:cpo_after_vim9script) |
1476 | 1476 |
1477 delete('Xvim9_script') | 1477 delete('Xvim9_script') |
1478 enddef | 1478 enddef |
1479 | 1479 |
1480 def Test_import_star_fails() | |
1481 writefile([], 'Xfoo.vim') | |
1482 var lines =<< trim END | |
1483 import * as foo from '/tmp/foo.vim' | |
1484 foo = 'bar' | |
1485 END | |
1486 CheckDefAndScriptFailure2(lines, 'E1094:', 'E1236: Cannot use foo itself') | |
1487 lines =<< trim END | |
1488 vim9script | |
1489 import * as foo from '/tmp/foo.vim' | |
1490 var that = foo | |
1491 END | |
1492 CheckScriptFailure(lines, 'E1029: Expected ''.''') | |
1493 enddef | |
1494 | |
1480 def Test_import_as() | 1495 def Test_import_as() |
1481 var export_lines =<< trim END | 1496 var export_lines =<< trim END |
1482 vim9script | 1497 vim9script |
1483 export var one = 1 | 1498 export var one = 1 |
1484 export var yes = 'yes' | 1499 export var yes = 'yes' |