aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-16 11:03:12 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-16 11:08:00 -0400
commitbe552c8340615a4c9e670bc77df5e6016214d4f4 (patch)
tree6b146ef4f9ea2f7e651abcc9336f850f6c88a032 /src/nvim/testdir
parent6531b175addc33c710b6e4e3501077e1d7213a8c (diff)
downloadrneovim-be552c8340615a4c9e670bc77df5e6016214d4f4.tar.gz
rneovim-be552c8340615a4c9e670bc77df5e6016214d4f4.tar.bz2
rneovim-be552c8340615a4c9e670bc77df5e6016214d4f4.zip
vim-patch:8.0.1231: expanding file name drops dash
Problem: Expanding file name drops dash. (stucki) Solution: Use the right position. (Christian Brabandt, closes vim/vim#2184) https://github.com/vim/vim/commit/c312b8b87a589ed8452dbf0f555f05ff86d04692
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cmdline.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index a93beac4ad..ac80dd383e 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -380,6 +380,27 @@ func Test_cmdline_complete_user_cmd()
delcommand Foo
endfunc
+func Test_cmdline_write_alternatefile()
+ new
+ call setline('.', ['one', 'two'])
+ f foo.txt
+ new
+ f #-A
+ call assert_equal('foo.txt-A', expand('%'))
+ f #<-B.txt
+ call assert_equal('foo-B.txt', expand('%'))
+ f %<
+ call assert_equal('foo-B', expand('%'))
+ new
+ call assert_fails('f #<', 'E95')
+ bw!
+ f foo-B.txt
+ f %<-A
+ call assert_equal('foo-B-A', expand('%'))
+ bw!
+ bw!
+endfunc
+
" using a leading backslash here
set cpo+=C