Mercurial > vim
diff src/testdir/test_expand.vim @ 19906:031184ace7c5 v8.2.0509
patch 8.2.0509: various code is not properly tested.
Commit: https://github.com/vim/vim/commit/cde0ff39da2459b16007fef701ebaa449fb6fe9d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 4 14:00:39 2020 +0200
patch 8.2.0509: various code is not properly tested.
Problem: various code is not properly tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5871)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 04 Apr 2020 14:15:05 +0200 |
parents | cb73f4ae6b7c |
children | 2c4d9ca33769 |
line wrap: on
line diff
--- a/src/testdir/test_expand.vim +++ b/src/testdir/test_expand.vim @@ -84,6 +84,15 @@ func Test_expandcmd() let $FOO="blue\tsky" call setline(1, "$FOO") call assert_equal("grep pat blue\tsky", expandcmd('grep pat <cfile>')) + + " Test for expression expansion `= + let $FOO= "blue" + call assert_equal("blue sky", expandcmd("`=$FOO .. ' sky'`")) + + " Test for env variable with spaces + let $FOO= "foo bar baz" + call assert_equal("e foo bar baz", expandcmd("e $FOO")) + unlet $FOO close! endfunc