aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-03 22:36:52 -0500
committerGitHub <noreply@github.com>2021-02-03 22:36:52 -0500
commitb96db38af184b1a271c88a4c89e709ce32143514 (patch)
tree9bf20d69202e83921a657fab8baef564368e173a /src/nvim/testdir
parent4a1a86a2bea4b88a8c981cabf2cf131830012edc (diff)
parentda3f9778aff8cfa134adec3fca93c00d82bcf4af (diff)
downloadrneovim-b96db38af184b1a271c88a4c89e709ce32143514.tar.gz
rneovim-b96db38af184b1a271c88a4c89e709ce32143514.tar.bz2
rneovim-b96db38af184b1a271c88a4c89e709ce32143514.zip
Merge pull request #13865 from janlazo/vim-8.2.2437
vim-patch:8.2.{2437,2439,2442,2446,2447,2448,2457,2458,2462,2464}
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_autocmd.vim11
-rw-r--r--src/nvim/testdir/test_mksession.vim26
-rw-r--r--src/nvim/testdir/test_options.vim4
3 files changed, 38 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index 374ad65aa9..1f3a45a9ab 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -1939,4 +1939,15 @@ func Test_autocmd_window()
%bw!
endfunc
+func Test_autocmd_closes_window()
+ au BufNew,BufWinLeave * e %e
+ file yyy
+ au BufNew,BufWinLeave * ball
+ call assert_fails('n xxx', 'E143:')
+
+ bwipe %
+ au! BufNew
+ au! BufWinLeave
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim
index f71da92bf8..88320e0c22 100644
--- a/src/nvim/testdir/test_mksession.vim
+++ b/src/nvim/testdir/test_mksession.vim
@@ -291,6 +291,32 @@ endfunc
endif
+func Test_mkview_open_folds()
+ enew!
+
+ call append(0, ['a', 'b', 'c'])
+ 1,3fold
+ " zR affects 'foldlevel', make sure the option is applied after the folds
+ " have been recreated.
+ normal zR
+ write! Xtestfile
+
+ call assert_equal(-1, foldclosed(1))
+ call assert_equal(-1, foldclosed(2))
+ call assert_equal(-1, foldclosed(3))
+
+ mkview! Xtestview
+ source Xtestview
+
+ call assert_equal(-1, foldclosed(1))
+ call assert_equal(-1, foldclosed(2))
+ call assert_equal(-1, foldclosed(3))
+
+ call delete('Xtestview')
+ call delete('Xtestfile')
+ %bwipe
+endfunc
+
" Test :mkview with a file argument.
func Test_mkview_file()
" Create a view with line number and a fold.
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index 84d99ebb74..5a10c9baa6 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -330,12 +330,10 @@ func Test_set_ttytype()
set ttytype=xterm
call assert_equal('xterm', &ttytype)
call assert_equal(&ttytype, &term)
- " "set ttytype=" gives E522 instead of E529
- " in travis on some builds. Why? Catch both for now
try
set ttytype=
call assert_report('set ttytype= did not fail')
- catch /E529\|E522/
+ catch /E529/
endtry
" Some systems accept any terminal name and return dumb settings,