summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_arglist.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-16 15:31:17 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-16 15:31:17 +0200
commit90305c66a8637ea43a6509c7ab597734dd218365 (patch)
tree355ef583c5c9f79a4f5849c087ba270728e402bf /src/testdir/test_arglist.vim
parent6a77d2667e982655f6adacee774ee7aa2581bd8a (diff)
patch 8.0.0721: :argedit can only have one argumentv8.0.0721
Problem: :argedit can only have one argument. Solution: Allow for multiple arguments. (Christian Brabandt)
Diffstat (limited to 'src/testdir/test_arglist.vim')
-rw-r--r--src/testdir/test_arglist.vim20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim
index dee2d65064..1a0e4aff28 100644
--- a/src/testdir/test_arglist.vim
+++ b/src/testdir/test_arglist.vim
@@ -188,6 +188,11 @@ func Test_zero_argadd()
2argu
arga third
call assert_equal(['edited', 'a', 'third', 'b', 'c', 'd'], argv())
+
+ 2argu
+ argedit file\ with\ spaces another file
+ call assert_equal(['edited', 'a', 'file with spaces', 'another', 'file', 'third', 'b', 'c', 'd'], argv())
+ call assert_equal('file with spaces', expand('%'))
endfunc
func Reset_arglist()
@@ -239,20 +244,19 @@ func Test_argedit()
call assert_equal(['a', 'b'], argv())
call assert_equal('b', expand('%:t'))
argedit a
- call assert_equal(['a', 'b'], argv())
+ call assert_equal(['a', 'b', 'a'], argv())
call assert_equal('a', expand('%:t'))
- if has('unix')
- " on MS-Windows this would edit file "a b"
- call assert_fails('argedit a b', 'E172:')
- endif
+ argedit C D
+ call assert_equal('C', expand('%:t'))
+ call assert_equal(['a', 'b', 'a', 'C', 'D'], argv())
argedit c
- call assert_equal(['a', 'c', 'b'], argv())
+ call assert_equal(['a', 'b', 'a', 'C', 'c', 'D'], argv())
0argedit x
- call assert_equal(['x', 'a', 'c', 'b'], argv())
+ call assert_equal(['x', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
enew! | set modified
call assert_fails('argedit y', 'E37:')
argedit! y
- call assert_equal(['x', 'y', 'a', 'c', 'b'], argv())
+ call assert_equal(['x', 'y', 'y', 'a', 'b', 'a', 'C', 'c', 'D'], argv())
%argd
endfunc