summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_cmd.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r--src/testdir/test_vim9_cmd.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 599c287e2..ad3454d83 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -375,6 +375,24 @@ def Test_command_star_range()
bwipe!
enddef
+def Test_f_args()
+ var lines =<< trim END
+ vim9script
+
+ func SaveCmdArgs(...)
+ let g:args = a:000
+ endfunc
+
+ command -nargs=* TestFArgs call SaveCmdArgs(<f-args>)
+
+ TestFArgs
+ assert_equal([], g:args)
+
+ TestFArgs one two three
+ assert_equal(['one', 'two', 'three'], g:args)
+ END
+ CheckScriptSuccess(lines)
+enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker