Mercurial > vim
comparison src/testdir/test_startup.vim @ 21765:08940efa6b4e v8.2.1432
patch 8.2.1432: various inconsistencies in test files
Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 12 18:50:36 2020 +0200
patch 8.2.1432: various inconsistencies in test files
Problem: Various inconsistencies in test files.
Solution: Add modelines where they were missing. Use Check commands instead
of silently skipping over tests. Adjust indents and comments.
(Ken Takata, closes #6695)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Aug 2020 19:00:08 +0200 |
parents | c44867526ad5 |
children | 1503ecd54f8a |
comparison
equal
deleted
inserted
replaced
21764:476b6faad407 | 21765:08940efa6b4e |
---|---|
19 " Verify the order in which plugins are loaded: | 19 " Verify the order in which plugins are loaded: |
20 " 1. plugins in non-after directories | 20 " 1. plugins in non-after directories |
21 " 2. packages | 21 " 2. packages |
22 " 3. plugins in after directories | 22 " 3. plugins in after directories |
23 func Test_after_comes_later() | 23 func Test_after_comes_later() |
24 if !has('packages') | 24 CheckFeature packages |
25 return | |
26 endif | |
27 let before =<< trim [CODE] | 25 let before =<< trim [CODE] |
28 set nocp viminfo+=nviminfo | 26 set nocp viminfo+=nviminfo |
29 set guioptions+=M | 27 set guioptions+=M |
30 let $HOME = "/does/not/exist" | 28 let $HOME = "/does/not/exist" |
31 set loadplugins | 29 set loadplugins |
78 call delete('Xanother', 'rf') | 76 call delete('Xanother', 'rf') |
79 call delete('Xafter', 'rf') | 77 call delete('Xafter', 'rf') |
80 endfunc | 78 endfunc |
81 | 79 |
82 func Test_pack_in_rtp_when_plugins_run() | 80 func Test_pack_in_rtp_when_plugins_run() |
83 if !has('packages') | 81 CheckFeature packages |
84 return | |
85 endif | |
86 let before =<< trim [CODE] | 82 let before =<< trim [CODE] |
87 set nocp viminfo+=nviminfo | 83 set nocp viminfo+=nviminfo |
88 set guioptions+=M | 84 set guioptions+=M |
89 let $HOME = "/does/not/exist" | 85 let $HOME = "/does/not/exist" |
90 set loadplugins | 86 set loadplugins |
111 call delete('Xtestout') | 107 call delete('Xtestout') |
112 call delete('Xhere', 'rf') | 108 call delete('Xhere', 'rf') |
113 endfunc | 109 endfunc |
114 | 110 |
115 func Test_help_arg() | 111 func Test_help_arg() |
116 if !has('unix') && has('gui') | 112 if !has('unix') && has('gui_running') |
117 " this doesn't work with gvim on MS-Windows | 113 throw 'Skipped: does not work with gvim on MS-Windows' |
118 return | |
119 endif | 114 endif |
120 if RunVim([], [], '--help >Xtestout') | 115 if RunVim([], [], '--help >Xtestout') |
121 let lines = readfile('Xtestout') | 116 let lines = readfile('Xtestout') |
122 call assert_true(len(lines) > 20) | 117 call assert_true(len(lines) > 20) |
123 call assert_match('Vi IMproved', lines[0]) | 118 call assert_match('Vi IMproved', lines[0]) |
552 | 547 |
553 call delete('Xtestout') | 548 call delete('Xtestout') |
554 endfunc | 549 endfunc |
555 | 550 |
556 func Test_startuptime() | 551 func Test_startuptime() |
557 if !has('startuptime') | 552 CheckFeature startuptime |
558 return | |
559 endif | |
560 let after = ['qall'] | 553 let after = ['qall'] |
561 if RunVim([], after, '--startuptime Xtestout one') | 554 if RunVim([], after, '--startuptime Xtestout one') |
562 let lines = readfile('Xtestout') | 555 let lines = readfile('Xtestout') |
563 let expected = ['--- VIM STARTING ---', 'parsing arguments', | 556 let expected = ['--- VIM STARTING ---', 'parsing arguments', |
564 \ 'shell init', 'inits 3', 'start termcap', 'opening buffers'] | 557 \ 'shell init', 'inits 3', 'start termcap', 'opening buffers'] |