summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_cmd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-25 20:02:55 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-25 20:02:55 +0200
commitcfe435d7feacf123ac060747b885f7c4328062ea (patch)
treef97da740c86f5fb5e9c7cedeb7b48c26ebf5ac47 /src/testdir/test_vim9_cmd.vim
parent49b2fb36ca94be14b98caf86420863d9bbe81a24 (diff)
downloadvim-git-cfe435d7feacf123ac060747b885f7c4328062ea.tar.gz
patch 8.2.0640: Vim9: expanding does not workv8.2.0640
Problem: Vim9: expanding does not work. Solution: Find wildcards in not compiled commands. Reorganize test files.
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r--src/testdir/test_vim9_cmd.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
new file mode 100644
index 000000000..7ccd1f70c
--- /dev/null
+++ b/src/testdir/test_vim9_cmd.vim
@@ -0,0 +1,23 @@
+" Test commands that are not compiled in a :def function
+
+source vim9.vim
+
+def Test_edit_wildcards()
+ let filename = 'Xtest'
+ edit `=filename`
+ assert_equal('Xtest', bufname())
+
+ let filenr = 123
+ edit Xtest`=filenr`
+ assert_equal('Xtest123', bufname())
+
+ filenr = 77
+ edit `=filename``=filenr`
+ assert_equal('Xtest77', bufname())
+
+ edit X`=filename`xx`=filenr`yy
+ assert_equal('XXtestxx77yy', bufname())
+enddef
+
+
+" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker