diff options
Diffstat (limited to 'test/functional/legacy/expand_spec.lua')
-rw-r--r-- | test/functional/legacy/expand_spec.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/legacy/expand_spec.lua b/test/functional/legacy/expand_spec.lua index 7bf6fb67dc..1b735080f4 100644 --- a/test/functional/legacy/expand_spec.lua +++ b/test/functional/legacy/expand_spec.lua @@ -62,6 +62,14 @@ describe('expand file name', function() call delete('Xdir ~ dir', 'd') call assert_false(isdirectory('Xdir ~ dir')) endfunc + + func Test_expand_tilde_filename() + split ~ + call assert_equal('~', expand('%')) + call assert_notequal(expand('%:p'), expand('~/')) + call assert_match('\~', expand('%:p')) + bwipe! + endfunc ]]) end) @@ -74,4 +82,9 @@ describe('expand file name', function() call('Test_with_tilde') expected_empty() end) + + it('does not expand tilde if it is a filename', function() + call('Test_expand_tilde_filename') + expected_empty() + end) end) |