diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-06 20:39:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-06 20:39:53 -0500 |
| commit | 7477703586af3710584888b197d84a0938a27fe9 (patch) | |
| tree | a2b17e49945fcdb5879e79a5d46bd27e326659ca /src/nvim/testdir | |
| parent | 5855a3ea7bf19fdf8d1c0351ce062386fb98127a (diff) | |
| parent | 8ae34ab7802763c2bbf64c8ba99c36d159da7220 (diff) | |
| download | rneovim-7477703586af3710584888b197d84a0938a27fe9.tar.gz rneovim-7477703586af3710584888b197d84a0938a27fe9.tar.bz2 rneovim-7477703586af3710584888b197d84a0938a27fe9.zip | |
Merge pull request #13468 from janlazo/vim-8.1.0818
vim-patch:8.1.{818,1131,2064},8.2.{587,879,1021,1296,2104}
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_ruby.vim | 24 | ||||
| -rw-r--r-- | src/nvim/testdir/test_search.vim | 23 |
2 files changed, 46 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_ruby.vim b/src/nvim/testdir/test_ruby.vim index 9c74c35049..1a274d1fec 100644 --- a/src/nvim/testdir/test_ruby.vim +++ b/src/nvim/testdir/test_ruby.vim @@ -27,6 +27,19 @@ func Test_rubydo() %bwipe! endfunc +func Test_rubydo_dollar_underscore() + throw 'skipped: TODO: ' + new + call setline(1, ['one', 'two', 'three', 'four']) + 2,3rubydo $_ = '[' + $_ + ']' + call assert_equal(['one', '[two]', '[three]', 'four'], getline(1, '$')) + bwipe! + + call assert_fails('rubydo $_ = 0', 'E265:') + call assert_fails('rubydo (') + bwipe! +endfunc + func Test_rubyfile() " Check :rubyfile does not SEGV with Ruby level exception but just fails let tempfile = tempname() . '.rb' @@ -391,3 +404,14 @@ func Test_ruby_p() let messages = GetMessages() call assert_equal(0, len(messages)) endfunc + +func Test_rubyeval_error() + " On Linux or Windows the error matches: + " "syntax error, unexpected end-of-input" + " whereas on macOS in CI, the error message makes less sense: + " "SyntaxError: array length must be 2" + " Unclear why. The test does not check the error message. + call assert_fails('call rubyeval("(")') +endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 6824c50112..8d71ada551 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -508,7 +508,7 @@ endfunc func Test_search_cmdline7() throw 'skipped: Nvim does not support test_override()' - " Test that an pressing <c-g> in an empty command line + " Test that pressing <c-g> in an empty command line " does not move the cursor if !exists('+incsearch') return @@ -1172,3 +1172,24 @@ func Test_search_special() set t_PE= exe "norm /\x80PS" endfunc + +" Test 'smartcase' with utf-8. +func Test_search_smartcase_utf8() + new + let save_enc = &encoding + set encoding=utf8 ignorecase smartcase + + call setline(1, 'Café cafÉ') + 1s/café/x/g + call assert_equal('x x', getline(1)) + + call setline(1, 'Café cafÉ') + 1s/cafÉ/x/g + call assert_equal('Café x', getline(1)) + + set ignorecase& smartcase& + let &encoding = save_enc + close! +endfunc + +" vim: shiftwidth=2 sts=2 expandtab |