comparison src/testdir/test_filechanged.vim @ 17657:0da9bc55c31a v8.1.1826

patch 8.1.1826: tests use hand coded feature and option checks commit https://github.com/vim/vim/commit/8c5a278fc508da6dfe50e69b6ee734451aa4eafb Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 7 23:07:07 2019 +0200 patch 8.1.1826: tests use hand coded feature and option checks Problem: Tests use hand coded feature and option checks. Solution: Use the commands from check.vim in more tests.
author Bram Moolenaar <Bram@vim.org>
date Wed, 07 Aug 2019 23:15:07 +0200
parents 8b92f3fea477
children 2f0f308c069c
comparison
equal deleted inserted replaced
17656:2adce9da20d8 17657:0da9bc55c31a
1 " Tests for when a file was changed outside of Vim. 1 " Tests for when a file was changed outside of Vim.
2 2
3 source check.vim
4
3 func Test_FileChangedShell_reload() 5 func Test_FileChangedShell_reload()
4 if !has('unix') 6 CheckUnix
5 return 7
6 endif
7 augroup testreload 8 augroup testreload
8 au FileChangedShell Xchanged_r let g:reason = v:fcs_reason | let v:fcs_choice = 'reload' 9 au FileChangedShell Xchanged_r let g:reason = v:fcs_reason | let v:fcs_choice = 'reload'
9 augroup END 10 augroup END
10 new Xchanged_r 11 new Xchanged_r
11 call setline(1, 'reload this') 12 call setline(1, 'reload this')
89 call delete(undofile('Xchanged_r')) 90 call delete(undofile('Xchanged_r'))
90 call delete('Xchanged_r') 91 call delete('Xchanged_r')
91 endfunc 92 endfunc
92 93
93 func Test_file_changed_dialog() 94 func Test_file_changed_dialog()
94 if !has('unix') || has('gui_running') 95 CheckUnix
95 return 96 CheckNotGui
96 endif
97 au! FileChangedShell 97 au! FileChangedShell
98 98
99 new Xchanged_d 99 new Xchanged_d
100 call setline(1, 'reload this') 100 call setline(1, 'reload this')
101 write 101 write