patch 8.2.2148: Vim9: crash when user command doesn't match
Problem: Vim9: crash when user command doesn't match.
Solution: Adjust command index. (closes #7479)
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 95d6969..bdc9ad0 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -701,5 +701,14 @@
delete('Xfile')
enddef
+def Test_ambiguous_user_cmd()
+ var lines =<< trim END
+ com Cmd1 eval 0
+ com Cmd2 eval 0
+ Cmd
+ END
+ CheckScriptFailure(lines, 'E464:')
+enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker