summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_cmd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-20 18:02:47 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-20 18:02:47 +0200
commitb8a9296cedb9fae35572041ef5cfa894f3ad9fbb (patch)
tree4fc8dd365cd0a7f66a583e0d457b5e13a8252b72 /src/testdir/test_vim9_cmd.vim
parentdf2524bbb495c880d094d9542abf7c23d739cc53 (diff)
downloadvim-git-b8a9296cedb9fae35572041ef5cfa894f3ad9fbb.tar.gz
patch 8.2.1496: Vim9: cannot use " #" in a mappingv8.2.1496
Problem: Vim9: cannot use " #" in a mapping. Solution: Do not remove a comment with the EX_NOTRLCOM flag. (closes #6746)
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r--src/testdir/test_vim9_cmd.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 676e97ceb..9f4231a9a 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -286,5 +286,14 @@ def Test_eval_command()
unlet g:val
enddef
+def Test_map_command()
+ let lines =<< trim END
+ nnoremap <F3> :echo 'hit F3 #'<CR>
+ assert_equal(":echo 'hit F3 #'<CR>", maparg("<F3>", "n"))
+ END
+ CheckDefSuccess(lines)
+ CheckScriptSuccess(['vim9script'] + lines)
+enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker