diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-06 22:31:42 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-06 22:31:42 +0200 |
commit | 472a0a880a709c027f4b19cfa56c08e78818112d (patch) | |
tree | f8bb4ee29e9a4b0dd7887411fef04a72461a419e /src/testdir/test_startup.vim | |
parent | 00ff380295338eedb6138ce87590cc6bed102e9d (diff) | |
download | vim-472a0a880a709c027f4b19cfa56c08e78818112d.zip |
patch 7.4.2172
Problem: No test for "vim --help".
Solution: Add a test.
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r-- | src/testdir/test_startup.vim | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 14e78ce3c..d2463f476 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -41,7 +41,7 @@ func Test_after_comes_later() call mkdir('Xafter/plugin', 'p') call writefile(['let done = 1'], 'Xafter/plugin/later.vim') - if RunVim(before, after) + if RunVim(before, after, '') let lines = readfile('Xtestout') let expected = ['Xbefore.vim', 'here.vim', 'foo.vim', 'later.vim', 'Xafter.vim'] @@ -60,3 +60,24 @@ func Test_after_comes_later() call delete('Xhere', 'rf') call delete('Xafter', 'rf') endfunc + +func Test_help_arg() + if RunVim([], [], '--help >Xtestout') + let lines = readfile('Xtestout') + call assert_true(len(lines) > 20) + call assert_true(lines[0] =~ 'Vi IMproved') + + " check if couple of lines are there + let found = 0 + for line in lines + if line =~ '-R.*Readonly mode' + let found += 1 + endif + if line =~ '--version' + let found += 1 + endif + endfor + call assert_equal(2, found) + endif + call delete('Xtestout') +endfunc |