diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-11 12:12:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-11 12:12:59 -0700 |
| commit | 413e86869ef147431a78946562c125938b41f533 (patch) | |
| tree | 4499c79a08aa7d0d3815c577f3ad98fcbdfe5b0b /src/nvim/testdir/test_eval_stuff.vim | |
| parent | e31652879e4ecfc63b450626209d09df79336de0 (diff) | |
| parent | 7175efb518d09aad59f7917c15b7c9752e9e320e (diff) | |
| download | rneovim-413e86869ef147431a78946562c125938b41f533.tar.gz rneovim-413e86869ef147431a78946562c125938b41f533.tar.bz2 rneovim-413e86869ef147431a78946562c125938b41f533.zip | |
Merge #14611 from seandewar/vim-8.1.1116
vim-patch:8.1.{1116,1188,1190,1355,1722,2035,2036,2038,2043},8.2.{0886,2309}
Diffstat (limited to 'src/nvim/testdir/test_eval_stuff.vim')
| -rw-r--r-- | src/nvim/testdir/test_eval_stuff.vim | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim index 4870b9a60a..084c856ba0 100644 --- a/src/nvim/testdir/test_eval_stuff.vim +++ b/src/nvim/testdir/test_eval_stuff.vim @@ -33,6 +33,24 @@ func Test_for_invalid() redraw endfunc +func Test_readfile_binary() + new + call setline(1, ['one', 'two', 'three']) + setlocal ff=dos + silent write XReadfile + let lines = readfile('XReadfile') + call assert_equal(['one', 'two', 'three'], lines) + let lines = readfile('XReadfile', '', 2) + call assert_equal(['one', 'two'], lines) + let lines = readfile('XReadfile', 'b') + call assert_equal(["one\r", "two\r", "three\r", ""], lines) + let lines = readfile('XReadfile', 'b', 2) + call assert_equal(["one\r", "two\r"], lines) + + bwipe! + call delete('XReadfile') +endfunc + func Test_mkdir_p() call mkdir('Xmkdir/nested', 'p') call assert_true(isdirectory('Xmkdir/nested')) @@ -90,6 +108,15 @@ func Test_string_concatenation() call assert_equal('ab', a) endfunc +" Test fix for issue #4507 +func Test_skip_after_throw() + try + throw 'something' + let x = wincol() || &ts + catch /something/ + endtry +endfunc + func Test_nocatch_restore_silent_emsg() silent! try throw 1 @@ -111,15 +138,6 @@ func Test_let_errmsg() let v:errmsg = '' endfunc -" Test fix for issue #4507 -func Test_skip_after_throw() - try - throw 'something' - let x = wincol() || &ts - catch /something/ - endtry -endfunc - func Test_number_max_min_size() " This will fail on systems without 64 bit number support or when not " configured correctly. |