aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-26 16:33:10 +0200
committerGitHub <noreply@github.com>2019-05-26 16:33:10 +0200
commit2b4c0181ba5a064b13f4e96e364124245e6f494c (patch)
tree5235096650cc259e01ecc1c5af2c88eaafacc0a6 /test
parent52215f57526f27c7752685ae280865ae71105969 (diff)
parent58d6e2d3cc4c39f7a2c78a3060758bee31f831e4 (diff)
downloadrneovim-2b4c0181ba5a064b13f4e96e364124245e6f494c.tar.gz
rneovim-2b4c0181ba5a064b13f4e96e364124245e6f494c.tar.bz2
rneovim-2b4c0181ba5a064b13f4e96e364124245e6f494c.zip
Merge #10064 from janlazo/vim-8.1.0211
vim-patch:8.1.{211,307}
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/expand_spec.lua13
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)