Mercurial > vim
view src/testdir/test_exists_autocmd.vim @ 23658:c8f26523d7d7 v8.2.2371
patch 8.2.2371: Vim9: crash when using types in :for with unpack
Commit: https://github.com/vim/vim/commit/036d07144efe213199b1ed8de998e6f12a056499
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 17 20:23:38 2021 +0100
patch 8.2.2371: Vim9: crash when using types in :for with unpack
Problem: Vim9: crash when using types in :for with unpack.
Solution: Check for skip_var_list() failing. Pass include_type to
skip_var_one(). Skip type when compiling. (closes #7694)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Jan 2021 20:30:03 +0100 |
parents | 08940efa6b4e |
children |
line wrap: on
line source
" Test that groups and patterns are tested correctly when calling exists() for " autocommands. function Test_AutoCommands() let results=[] augroup auexists augroup END call assert_true(exists("##BufEnter")) call assert_false(exists("#BufEnter")) au BufEnter * let g:entered=1 call assert_true(exists("#BufEnter")) call assert_false(exists("#auexists#BufEnter")) augroup auexists au BufEnter * let g:entered=1 augroup END call assert_true(exists("#auexists#BufEnter")) call assert_false(exists("#BufEnter#*.test")) au BufEnter *.test let g:entered=1 call assert_true(exists("#BufEnter#*.test")) edit testfile.test call assert_false(exists("#BufEnter#<buffer>")) au BufEnter <buffer> let g:entered=1 call assert_true(exists("#BufEnter#<buffer>")) edit testfile2.test call assert_false(exists("#BufEnter#<buffer>")) endfunction " vim: shiftwidth=2 sts=2 expandtab