Mercurial > vim
view src/testdir/test_exists_autocmd.vim @ 25155:a37cf57980f9 v8.2.3114
patch 8.2.3114: Amiga-like systems: build error using stat()
Commit: https://github.com/vim/vim/commit/599a6e5b3629d943a795cd69e4d3d19886f86405
Author: =?UTF-8?q?Ola=20S=C3=B6der?= <rolfkopman@gmail.com>
Date: Tue Jul 6 20:15:46 2021 +0200
patch 8.2.3114: Amiga-like systems: build error using stat()
Problem: Amiga-like systems: build error using stat().
Solution: Only build swapfile_process_running() on systems where it is
actually used. (Ola S?der, closes #8519)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 06 Jul 2021 20:30:03 +0200 |
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