Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 20099:058b41f85bcb v8.2.0605
patch 8.2.0605: Vim9: cannot unlet an environment variable
Commit: https://github.com/vim/vim/commit/7bdaea6e0df849cf3dd7eaaf454eb88f637d1884
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 19 18:27:26 2020 +0200
patch 8.2.0605: Vim9: cannot unlet an environment variable
Problem: Vim9: cannot unlet an environment variable.
Solution: Implement unlet for $VAR.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Apr 2020 18:30:04 +0200 |
parents | a64c16ff98b8 |
children | f40231487a49 |
comparison
equal
deleted
inserted
replaced
20098:a901238a18a2 | 20099:058b41f85bcb |
---|---|
287 'let svar = 123', | 287 'let svar = 123', |
288 'def Func()', | 288 'def Func()', |
289 ' unlet s:svar', | 289 ' unlet s:svar', |
290 'enddef', | 290 'enddef', |
291 ], 'E1081:') | 291 ], 'E1081:') |
292 | |
293 $ENVVAR = 'foobar' | |
294 assert_equal('foobar', $ENVVAR) | |
295 unlet $ENVVAR | |
296 assert_equal('', $ENVVAR) | |
292 enddef | 297 enddef |
293 | 298 |
294 func Test_wrong_type() | 299 func Test_wrong_type() |
295 call CheckDefFailure(['let var: list<nothing>'], 'E1010:') | 300 call CheckDefFailure(['let var: list<nothing>'], 'E1010:') |
296 call CheckDefFailure(['let var: list<list<nothing>>'], 'E1010:') | 301 call CheckDefFailure(['let var: list<list<nothing>>'], 'E1010:') |