aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-07 16:08:49 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-08 10:25:12 -0400
commita597ea7bccf4f7fdf7d8b35f934677201fe69134 (patch)
tree68c82859c572677d1d13c4a6551f35b72eee988f
parentde16b6dc7a61f2f0726537dfaa0c9a8061c7e563 (diff)
downloadrneovim-a597ea7bccf4f7fdf7d8b35f934677201fe69134.tar.gz
rneovim-a597ea7bccf4f7fdf7d8b35f934677201fe69134.tar.bz2
rneovim-a597ea7bccf4f7fdf7d8b35f934677201fe69134.zip
vim-patch:8.1.0409: startup test fails on MS-Windows
Problem: Startup test fails on MS-Windows. Solution: Do the Arabic test in silent Ex mode. Loosen the check for -V2. https://github.com/vim/vim/commit/4b1c9a91b5d7f98b6e3391e776a289d485aa274d
-rw-r--r--src/nvim/testdir/test_startup.vim15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_startup.vim b/src/nvim/testdir/test_startup.vim
index c86c62711f..8656985130 100644
--- a/src/nvim/testdir/test_startup.vim
+++ b/src/nvim/testdir/test_startup.vim
@@ -254,16 +254,21 @@ func Test_p_arg()
call delete('Xtestout')
endfunc
-" Test the -V[N] argument to set the 'version' option to [N]
+" Test the -V[N] argument to set the 'verbose' option to [N]
func Test_V_arg()
+ if has('gui_running')
+ " Can't catch the output of gvim.
+ return
+ endif
let out = system(GetVimCommand() . ' --clean -es -X -V0 -c "set verbose?" -cq')
call assert_equal(" verbose=0\n", out)
let out = system(GetVimCommand() . ' --clean -es -X -V2 -c "set verbose?" -cq')
- call assert_match("^sourcing \"$VIMRUNTIME/defaults\.vim\"\r\nSearching for \"filetype\.vim\".*\n verbose=2\n$", out)
+ call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nSearching for \"filetype\.vim\".*\n", out)
+ call assert_match(" verbose=2\n", out)
let out = system(GetVimCommand() . ' --clean -es -X -V15 -c "set verbose?" -cq')
- call assert_match("\+*\nsourcing \"$VIMRUNTIME/defaults\.vim\"\r\nline 1: \" The default vimrc file\..*\n verbose=15\n\+*", out)
+ call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nline 1: \" The default vimrc file\..* verbose=15\n", out)
endfunc
" Test the -A, -F and -H arguments (Arabic, Farsi and Hebrew modes).
@@ -272,7 +277,9 @@ func Test_A_F_H_arg()
\ 'call writefile([&rightleft, &arabic, 0, &hkmap], "Xtestout")',
\ 'qall',
\ ]
- if has('arabic') && RunVim([], after, '-A')
+ " Use silent Ex mode to avoid the hit-Enter prompt for the warning that
+ " 'encoding' is not utf-8.
+ if has('arabic') && &encoding == 'utf-8' && RunVim([], after, '-e -s -A')
let lines = readfile('Xtestout')
call assert_equal(['1', '1', '0', '0'], lines)
endif